After migration to a new Ubuntu server (openrem version still 0.10.0, but newer pip packages) I started getting a "year out of range" error during one of my xlsx exports. On the old machine the export is ok.
Assuming this has something to do with timestamps in the postgres database I compared the remapp_generalstudymoduleattr tables between the two servers and found some entries on the new server (with same id) having study_workload_chart_time of the form 1899-12-31-* while on the old server these were all 1900-01-01-*. Could this be the issue? What's the purpose of this column? Can I edit/wipe these values? Any suggestions on how to fix this problem?
thanks!
Tim de Wit
[2023-05-23 16:09:30,782: ERROR/ForkPoolWorker-2] Task remapp.exports.rf_export.rfxlsx[80671a66-f622-4b2b-82db-230c3cf247aa] raised unexpected: ValueError('year is out of range',)
Traceback (most recent call last):
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/celery/app/trace.py", line 641, in __protected_call__
return self.run(*args, **kwargs)
File "remapp/exports/rf_export.py", line 296, in rfxlsx
book, sheetlist = generate_sheets(e, book, protocolheaders, modality=u"RF", pid=pid, name=name, patid=patid)
File "remapp/exports/export_common.py", line 164, in generate_sheets
for s in events:
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/query.py", line 162, in __iter__
self._fetch_all()
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all
self._result_cache = list(self.iterator())
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/query.py", line 254, in iterator
for row in compiler.results_iter(results):
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 797, in results_iter
for rows in results:
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1152, in cursor_iter
sentinel):
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1151, in <lambda>
for rows in iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/utils.py", line 105, in inner
return func(*args, **kwargs)
ValueError: year is out of range