'Database' object has no attribute '_cache'
d-krupke opened this issue · 0 comments
d-krupke commented
The following exception has been thrown during read_as_pandas_table. It did not corrupt the result but it is odd.
Exception ignored in: <function Database.__del__ at 0x7f449f0c2af0>
Traceback (most recent call last):
File "/home/krupke/anaconda3/envs/mo/lib/python3.8/site-packages/aemeasure/database.py", line 114, in __del__
self.flush()
File "/home/krupke/anaconda3/envs/mo/lib/python3.8/site-packages/aemeasure/database.py", line 68, in flush
if not self._cache:
AttributeError: 'Database' object has no attribute '_cache'
Likely reason: An exception has been thrown during initialization and the _cache is created last. The destructor then failed. Easiest solution: Wrap the destructor with a try-except. However, I don't know, why the construction should ever fail.