Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
AttributeError: '_thread._local' object has no attribute '_pydal_connection_140103876850296_30686'
Traceback (most recent call last):
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pyrogram/client/client.py", line 707, in update_worker
{i.id: i for i in update[2]}
File "/home/schemelab/prg/surgetrader/src/lib/telegram.py", line 78, in update_handler
lib.buy.process(ini, [market])
File "/home/schemelab/prg/surgetrader/src/lib/buy.py", line 412, in process
buycoin(config_file, user_config, exchange, top_coins)
File "/home/schemelab/prg/surgetrader/src/lib/buy.py", line 253, in buycoin
_buycoin(config_file, user_config, exchange, market, avail)
File "/home/schemelab/prg/surgetrader/src/lib/buy.py", line 242, in _buycoin
record_buy(config_file, result['result']['uuid'], mkt, rate, amount_of_coin)
File "/home/schemelab/prg/surgetrader/src/lib/buy.py", line 134, in record_buy
order_id=order_id, market=mkt, purchase_price=rate, amount=amount)
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pydal/objects.py", line 753, in insert
ret = self._db._adapter.insert(self, row.op_values())
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pydal/adapters/base.py", line 486, in insert
raise e
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pydal/adapters/base.py", line 481, in insert
self.execute(query)
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pydal/adapters/__init__.py", line 63, in wrap
if not args[0].connection:
File "/home/schemelab/install/miniconda3/lib/python3.6/site-packages/pydal/connection.py", line 36, in connection
return getattr(THREAD_LOCAL, self._connection_uname_)
AttributeError: '_thread._local' object has no attribute '_pydal_connection_140103876850296_30686'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment