Sun 30 Sep 2012 10:41:55 PM UTC, original submission:
Hi Sebastián,
Running the demo script on a Debian 6.0.3 (64 bit), Python 2.6 and Postgresql 8.4 throws the below error.
We will be very grateful if you may look into it?
Note: Family and Family Members information is added to the database, its only the patients records that are missing.
2012-09-29 20:32:03,902 ERROR Wrong SQL: INSERT INTO "gnuhealth_patient" ("second_hand_smoker","fertile","prison_current","domestic_violence","hostile_area","currently_pregnant","sexual_abuse","sewers","sexual_partners","occupation","eats_alone","electricity","housing","gpa","colposcopy","menopausal","soft_drinks","single_parent","home_safety","coffee","gas","sexual_practices","smoking","television","trash","name","marital_status","relative_in_prison","breast_self_examination","deceased","works_at_home","ex_drug_addict","ses","sexual_preferences","telephone","sex","car_revision","education","car_child_safety","primary_care_doctor","helmet","drug_addiction","alcohol","ex_alcoholic","traffic_laws","pap_test","drug_iv","motorcycle_rider","internet","critical_info","mammography","exercise","sex_with_prostitutes","ex_smoker","diet","water","prison_past","car_seat_belt","prostitute","working_children","dob","drug_usage","sleep_during_daytime","teenage_pregnancy","school_withdrawal","salt","identification_code", create_uid, create_date) VALUES ( false, false, false, false, false, false, false, 1, E'm', 584, false, 1, E'2', E'G1P1A0', false, false, false, false, false, false, 1, E's', false, 1, false, 5, E'm', false, false, false, false, false, E'2', E'h', 1, E'f', false, E'5', false, 1, false, false, false, false, false, false, false, false, false, E'β-lactam hypersensitivity', false, false, false, true, false, 1, false, false, false, false, '1985-10-04'::date, false, false, false, false, false, E'PAC001', 1, '2012-09-29T20:32:03.899768'::timestamp) RETURNING id
Traceback (most recent call last):
File "health_demo_server.py", line 276, in <module>
LoadBetzFamilyInfo()
File "health_demo_server.py", line 131, in LoadBetzFamilyInfo
patient.save()
File "/home/medicare/.local/lib/python2.6/site-packages/proteus/__init__.py", line 604, in save
self.__id = self._proxy.create(values, context)
File "/home/medicare/.local/lib/python2.6/site-packages/proteus/config.py", line 121, in _call_
res = getattr(self._object, self._name)(*args)
File "/home/medicare/.local/lib/python2.6/site-packages/trytond/modules/health/health.py", line 927, in create
return super(PatientData, self).create(values)
File "/home/medicare/.local/lib/python2.6/site-packages/trytond/model/modelsql.py", line 345, in create
tuple(upd2))
File "/home/medicare/.local/lib/python2.6/site-packages/trytond/backend/postgresql/database.py", line 316, in execute
res = self.cursor.execute(sql, params)
psycopg2.ProgrammingError: column "sewers" is of type boolean but expression is of type integer
LINE 1: ... false, false, false, false, false, false, false, 1, E'm', 5...
^
HINT: You will need to rewrite or cast the expression.
|