bugGNU Health - Bugs: bug #64464, health_genetics export po file...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #64464: health_genetics export po file error.

Submitter:  Feng Shu <tumashu>
Submitted:  Mon 24 Jul 2023 04:59:53 AM UTC
   
 
Category:  Programming / Tracebacks Severity:  3 - Normal
Item Group:  None Status:  Ready For Test
Privacy:  Public Assigned to:  meanmicio
Open/Closed:  Open Release:  4.3.0
Module:  health_genetics Component:  Hospital Management

Jump to the original submission

Fri 11 Aug 2023 11:27:35 AM UTC, comment #6: 
Luis Falcon <meanmicio>
Group administrator
Fri 11 Aug 2023 07:14:37 AM UTC, comment #5: 

Thanks, Feng!

I'll check it out today.. don't recall seeing the traceback on a new DB..

Sometimes in the past I ran into similar issues because of the length of the model name... I'll double check today and let you know.

Bests
Luis

Luis Falcon <meanmicio>
Group administrator
Fri 11 Aug 2023 01:08:27 AM UTC, comment #4: 

I think it is health_genetics_uniprot' problem,

feng@Tumashu ~/gnuhealth/tryton/server/trytond-6.0.33/bin $ ./trytond-admin -d gnuhealth -u health_genetics_uniprot
Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 458, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 513, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 295, in endElement
    self.mh.import_record(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, args, *kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 614, in create
    cursor.execute(*table.insert(insert_columns,
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/backend/postgresql/database.py", line 74, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UndefinedColumn: 错误:  关系 "gnuhealth_protein_disease" 的 "create_uid" 字段不存在
LINE 1: INSERT INTO "gnuhealth_protein_disease" AS "a" ("create_uid"...
                                                        ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/bin/./trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 440, in load_modules
    _load_modules(update)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 408, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 460, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model gnuhealth.protein.disease with id health_genetics_uniprot.DI-00001.
feng@Tumashu ~/gnuhealth/tryton/server/trytond-6.0.33/bin $

Feng Shu <tumashu>
Thu 10 Aug 2023 07:40:58 AM UTC, comment #3: 

Hmm I ran po-export...

The error seems to happen in here:

psycopg2.errors.UndefinedColumn: column "create_uid" of relation "gnuhealth_protein_disease" does not exist
LINE 1: INSERT INTO "gnuhealth_protein_disease" AS "a" ("create_uid"...

psycopg2 complains about the create_uid column does not exist on table gnuhealth_protein_disease.

It might be related to the length of the model, but I have not run into issues yet in other contexts, and the protein disease model has been there for some versions now...
... I'll run the export process from the client and let you know.


                                              Table "public.gnuhealth_protein_disease"
       Column        |              Type              | Collation | Nullable |                        Default                       
---------------------+--------------------------------+-----------+----------+-------------------------------------------------------
 id                  | integer                        |           | not null | nextval('gnuhealth_protein_disease_id_seq'::regclass)
 acronym             | character varying              |           | not null |
 active              | boolean                        |           |          | false
 create_date         | timestamp(6) without time zone |           |          |
 create_uid          | integer                        |           |          |
 description         | text                           |           |          |

...

Luis Falcon <meanmicio>
Group administrator
Wed 09 Aug 2023 02:12:01 AM UTC, comment #2: 

raceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 458, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 513, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 295, in endElement
    self.mh.import_record(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, args, *kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 614, in create
    cursor.execute(*table.insert(insert_columns,
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/backend/postgresql/database.py", line 74, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UndefinedColumn: 错误:  关系 "gnuhealth_protein_disease" 的 "create_uid" 字段不存在
LINE 1: INSERT INTO "gnuhealth_protein_disease" AS "a" ("create_uid"...
                                                        ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 440, in load_modules
    _load_modules(update)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 408, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 460, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model gnuhealth.protein.disease with id health_genetics_uniprot.DI-00001.
## Add Language to tryton ...
Connecting to database 'po-export-db' with 'admin' ...
/usr/lib/python3/dist-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
  from crypt import crypt as _crypt
## Running trytond-admin command to update DB (3. Active language) ...
Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 458, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 513, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 295, in endElement
    self.mh.import_record(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, args, *kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 614, in create
    cursor.execute(*table.insert(insert_columns,
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/backend/postgresql/database.py", line 74, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UndefinedColumn: 错误:  关系 "gnuhealth_protein_disease" 的 "create_uid" 字段不存在
LINE 1: INSERT INTO "gnuhealth_protein_disease" AS "a" ("create_uid"...
                                                        ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 440, in load_modules
    _load_modules(update)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 408, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 460, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model gnuhealth.protein.disease with id health_genetics_uniprot.DI-00001.

Feng Shu <tumashu>
Mon 24 Jul 2023 08:41:17 AM UTC, comment #1: 

Hi, Feng


The health_genetics packages and some of their models are being updated for in the default (development branch) for the upcoming 4.4. (see task task #16404: Update functionality in Health Genetics packages).

The stable branch 4.2 is not affected.

About the specific error, today I will be adding / updating datafiles and filling in the new primary key.

Bests
Luis





Luis Falcon <meanmicio>
Group administrator
Mon 24 Jul 2023 04:59:53 AM UTC, original submission:  


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 458, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 513, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 295, in endElement
    self.mh.import_record(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, args, *kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 634, in create
    cls.__raise_integrity_error(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 352, in __raise_integrity_error
    raise RequiredValidationError(
trytond.model.modelstorage.RequiredValidationError: A value is required for field "aliases" in "gnuhealth.gene". -

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 440, in load_modules
    _load_modules(update)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 408, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 460, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model gnuhealth.gene with id health_genetics.A2BP1.
## Add Language to tryton ...
Connecting to database 'po-export-db' with 'admin' ...
/usr/lib/python3/dist-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
  from crypt import crypt as _crypt
## Running trytond-admin command to update DB (3. Active language) ...
Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 614, in create
    cursor.execute(*table.insert(insert_columns,
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/backend/postgresql/database.py", line 74, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.NotNullViolation: 错误:  null value in column "aliases" of relation "gnuhealth_gene" violates not-null constraint
DETAIL:  失败, 行包含(1, null, 16, 2023-07-24 04:57:44.862633, 0, null, null, null, mutations , 16p13, ataxin 2-binding protein 1, A2BP1, null, null, null).


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 458, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 513, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 295, in endElement
    self.mh.import_record(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, args, *kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 634, in create
    cls.__raise_integrity_error(
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/model/modelsql.py", line 352, in __raise_integrity_error
    raise RequiredValidationError(
trytond.model.modelstorage.RequiredValidationError: A value is required for field "aliases" in "gnuhealth.gene". -

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 440, in load_modules
    _load_modules(update)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 408, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/feng/gnuhealth/tryton/server/trytond-6.0.33/trytond/convert.py", line 460, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model gnuhealth.gene with id health_genetics.A2BP1.

Feng Shu <tumashu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by meanmicio (Posted a comment)
  • -email is unavailable- added by tumashu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-11 meanmicio StatusConfirmed Ready For Test
    2023-08-10 meanmicio StatusIn Progress Confirmed
    2023-07-24 meanmicio CategoryNone Programming / Tracebacks
        StatusNone In Progress
        Assigned toNone meanmicio
        ReleaseNone 4.3.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code