question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing not thread-save

See original GitHub issue

Sorry for posting information without any additional data, I have lack of experience to provide you simple example. I hope current information will enough.

The problem was in pyinstaller https://github.com/pyinstaller/pyinstaller/issues/2371 and now I see absolutely same problem with Nuitka last factory version on windows 7. One thread works perfect, 2 threads or more shows:

AttributeError: module 'XXX' has no attribute 'YYY'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Aug 29, 2018

I pushed this to the hotfix/0.5.32.8 branch, but I won’t be able to actually release it until after my holiday I suspect, at least not to PyPI.

1reaction
kayhayencommented, Aug 28, 2018

I pushed to factory a commit that addresses the issue, let me know if it works for you:

http://nuitka.net/doc/factory.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue 38884: __import__ is not thread-safe on Python 3
This issue tracker has been migrated to GitHub, and is currently read-only. For more information, see the GitHub FAQs in the Python's Developer ......
Read more >
Issue 2834: import of Java classes is not thread safe - Jython
Any thread not already waiting inside the type system will then pick up an incomplete PyType from the ClassValue. We do need those...
Read more >
import inside of a Python thread - Stack Overflow
Normal imports are thread-safe because they acquire an import lock prior to execution and release it once the import is done. If you...
Read more >
The library is not thread-safe · Issue #106 · kjd/idna - GitHub
I imagine you can fix this for your application by calling idna.encode() once before the multiple threads are started, so the import will...
Read more >
Thread-Safe Write to File in Python
example of writing to a file is not thread-safe. from random import random. from time import sleep. from threading import Thread.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found