Message269285
I am trying something similar to BrownTruck in issue : https://github.com/pypa/pip/pull/3733
I tried to execute pip.main('install','-U',<some_package>) from a thread.
I got a similar error :
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pip/commands/install.py", line 299, in run
requirement_set.prepare_files(finder)
File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 476, in _prepare_file
with indent_log():
File "/usr/lib/python3.4/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.4/dist-packages/pip/utils/logging.py", line 34, in indent_log
_log_state.indentation += num
AttributeError: '_thread._local' object has no attribute 'indentation'
There is some problem with threading.local() in pip.utils.logging. Can anyone please suggest a workaround for it. It is necessary for me to use threads other than the main GUI thread to update text. I need to update text and do long processes ( like searching for results using pip search command or installing or uninstalling) when someone presses a button.
When I don't use threading to update text, the GUI text is updated only after the callback returns. |
|
Date |
User |
Action |
Args |
2016-06-26 13:41:12 | upendra-k14 | set | recipients:
+ upendra-k14, rhettinger, terry.reedy, ncoghlan, ned.deily, dstufft, lorenzogotuned |
2016-06-26 13:41:12 | upendra-k14 | set | messageid: <1466948472.23.0.659074718013.issue27051@psf.upfronthosting.co.za> |
2016-06-26 13:41:12 | upendra-k14 | link | issue27051 messages |
2016-06-26 13:41:11 | upendra-k14 | create | |
|