Thriftpy / thriftpy2

Pure python approach of Apache Thrift.
MIT License
562 stars 89 forks source link

How to solve '_thread._local' object has no attribute 'thrift_stack' #276

Closed kevinrocket closed 1 month ago

kevinrocket commented 1 month ago

I am encountering such a problem. File "/opt/tiger/model_cloister/utils/libra_data.py", line 17, in query_libra_data base_thrift = thriftpy2.load("/opt/tiger/model_cloister/idls/base.thrift", module_name="base_thrift") File "/usr/local/lib/python3.9/site-packages/thriftpy2/parser/init.py", line 36, in load thrift = parse(path, module_name, include_dirs=include_dirs, File "/usr/local/lib/python3.9/site-packages/thriftpy2/parser/parser.py", line 547, in parse for thrift in threadlocal.thrift_stack: AttributeError: '_thread._local' object has no attribute 'thrift_stack'

aisk commented 1 month ago

This have been fixed by #267, and shipped with v0.5.1rc2.

aisk commented 1 month ago

FYI, v0.5.1 is released and should fix this issue.