PyDoc ValueError: signal only works in main thread
See original GitHub issueCreate file “test.py” with this content:
import pyxel
pyxel.init(160, 120)
Then run pydoc -b
from the same directory.
Now navigate to your test module and get the error:
ErrorDuringImport: problem in test - ValueError: signal only works in main thread or with pypy.thread.enable_signals()
I’m new in python so sorry if my issue is noobish, but I have no idea how to provide documentation to my app due to this error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
ValueError: signal only works in main thread - Stack Overflow
Python signal handlers are always executed in the main Python thread, even if the signal was received in another thread. This means that...
Read more >signal only works in main thread of the main interpreter #1
I am getting this error "signal only works in main thread of the main interpreter". Can you please explain it to me, how...
Read more >Issue 38904: "signal only works in main thread" in main thread
The problem for both modules is that the Python runtime may have actually been initialized in a different thread, which is the actual...
Read more >ValueError('signal only works in main thread') - W&B Help
ValueError ('signal only works in main thread'). I'm running a hyper parameter sweep using PL and Weights and Biases's framework.
Read more >ValueError: signal only works in main thread - DevPress - CSDN
Answer a question When i run this code i get this error: ValueError: signal only works in main thread I'm using ActiveMQ.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This would work:
this prevents creating the object during import too. Usually people don’t import example scripts and simply run them. An exception is things like pydoc, which will scan every directory in a module. It also looks like this behavior changed over time in python:https://bugs.python.org/issue38904
put
pyxel.init
in a function or behind aif __name__ == '__main__'
so it won’t call pyxel.init during importing a module