Has anyone encountered some issues running tryton-cron lately from a fresh install? I just happened to use version 6.0 and I am getting this weird error:
Traceback (most recent call last):
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/modelstorage.py", line 1807, in save
transaction.set_user(user), \
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/transaction.py", line 196, in set_user
self.context = self.context.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/transaction.py", line 149, in stop
self.rollback()
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/transaction.py", line 249, in rollback
self.connection.rollback()
AttributeError: 'NoneType' object has no attribute 'rollback'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/ir/cron.py", line 164, in run
cron.run_once()
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/descriptors.py", line 31, in newfunc
return self.func(owner, [instance], *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/modelview.py", line 775, in wrapper
return func(cls, records, *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/modules/company/ir.py", line 107, in run_once
super(Cron, cls).run_once([cron])
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/modelview.py", line 775, in wrapper
return func(cls, records, *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/ir/cron.py", line 141, in run_once
getattr(Model, method)()
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/modules/account_cr_invoice/hacienda.py", line 1073, in process_posted_messages
cls.send_doc(hms, enabled_companies)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/modelview.py", line 775, in wrapper
return func(cls, records, *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/modules/account_cr_invoice/hacienda.py", line 1130, in send_doc
with api() as session:
File "/home/richi/work/dev-tryton/pip/fecr/fecr/api.py", line 401, in __enter__
self.api.try_get_token()
File "/home/richi/work/dev-tryton/pip/fecr/fecr/api.py", line 144, in try_get_token
self._set_token(self.fetch_token())
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/modules/account_cr_invoice/hacienda.py", line 750, in fetch_token
return self.request_new_token()
File "/home/richi/work/dev-tryton/pip/fecr/fecr/api.py", line 250, in request_new_token
self.save_token(token)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/modules/account_cr_invoice/hacienda.py", line 746, in save_token
self.token_source.save()
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/descriptors.py", line 31, in newfunc
return self.func(owner, [instance], *args, **kwargs)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/model/modelstorage.py", line 1817, in save
cls.write(*sum(
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/transaction.py", line 136, in __exit__
self.stop(type is None)
File "/home/richi/work/dev-tryton/tryton_src/trytond/trytond/transaction.py", line 151, in stop
self.database.put_connection(
AttributeError: 'NoneType' object has no attribute 'put_connection'
I really don’t know where the problem is, anyone has seen this issue before? It appears as if something related to the threads or context being set to None and tryton-cron doesn’t know it? Please note that at the first 10 minutes of starting tryton-cron, it works well, it is after 10 or 15 minutes, that this error appears. Tryton-cron appears not to crash, but after the error, it is not able to perform any tasks the error continues infinitively.