smart-classic / smart_server

SMArt Bootstrap Server
Apache License 2.0
22 stars 10 forks source link

AttributeError: 'module' object has no attribute 'XMLField' #6

Closed arjunsanyal closed 12 years ago

arjunsanyal commented 12 years ago

Where's XMLField?

~/Desktop/chip_new/code/$ python smart_manager.py -l
cd smart_server; PYTHONPATH=.:.. DJANGO_SETTINGS_MODULE=settings python load_tools/load_one_patient.py  ../smart_sample_patients/generated-data/* ;cd ..;
Traceback (most recent call last):
  File "load_tools/load_one_patient.py", line 3, in <module>
    from smart.models.rdf_store import TemporaryStoreConnector, RecordStoreConnector
  File "/Users/arjunsanyal/Desktop/chip_new/code/smart_server/smart/models/__init__.py", line 11, in <module>
    from records import *
  File "/Users/arjunsanyal/Desktop/chip_new/code/smart_server/smart/models/records.py", line 16, in <module>
    from smart.models.rdf_store import DemographicConnector, RecordStoreConnector
  File "/Users/arjunsanyal/Desktop/chip_new/code/smart_server/smart/models/rdf_store.py", line 18, in <module>
    class PHA_RDFStore(Object): 
  File "/Users/arjunsanyal/Desktop/chip_new/code/smart_server/smart/models/rdf_store.py", line 21, in PHA_RDFStore
    triples = models.XMLField(schema_path="%s../schema/%s"%(settings.XSLT_STYLESHEET_LOC, "rdf.xsd"))
AttributeError: 'module' object has no attribute 'XMLField'

~/Desktop/chip_new/code/$ grep -r XMLField . 
./smart_server/smart/models/rdf_store.py:  triples = models.XMLField(schema_path="%s../schema/%s"%(settings.XSLT_STYLESHEET_LOC, "rdf.xsd"))
Binary file ./smart_server/smart/models/rdf_store.pyc matches
~/Desktop/chip_new/code/$ 
arjunsanyal commented 12 years ago

Ah ha, this was deprecated in django 1.4... I installed django latest from pip, so I'm quite a bit ahead of what you guys are running. Downgraded with

pip uninstall django

# pip install django==1.1

Hooray for pip!