Skip to content

Instantly share code, notes, and snippets.

@metaperl
Created April 12, 2018 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaperl/11b79ef5e46590ba905c944d10dc963c to your computer and use it in GitHub Desktop.
Save metaperl/11b79ef5e46590ba905c944d10dc963c to your computer and use it in GitHub Desktop.
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'
@apoorvqspl
Copy link

I am facing the same error.
Do we have an explanation for this error?
Do we know how to resolve it?

@metaperl
Copy link
Author

I dont know. I would ask on their mailing lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment