Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module '__main__' has no attribute '__spec__' #121

Open
fpavogt opened this issue Mar 1, 2021 · 1 comment
Open

module '__main__' has no attribute '__spec__' #121

fpavogt opened this issue Mar 1, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request help !!! Extra attention is needed

Comments

@fpavogt
Copy link
Member

fpavogt commented Mar 1, 2021

Describe the bug

While enabling the use of multiprocessing for the computation of GDPs, I have hit a bug so hard that it led me to submit my first StackOverflow question.

The following work-around has been implemented in the code for now:

        import sys
        try:
            sys.modules['__main__'].__spec__ is None
        except:
            logger.warning('BUG: __spec__ is not set. Fixing it by hand ...')
            sys.modules['__main__'].__spec__ = None

This ticket is to remember to fix this. And beg for help. 😢

To Reproduce
See the MWE on my StackOverflow question.

@fpavogt fpavogt added bug Something isn't working help !!! Extra attention is needed labels Mar 1, 2021
@fpavogt fpavogt self-assigned this Mar 1, 2021
@fpavogt fpavogt removed the bug Something isn't working label Feb 25, 2022
@fpavogt
Copy link
Member Author

fpavogt commented Mar 3, 2022

As of #199, this workaround is present in the following two locations:
dvas/data/startegy/resample.py
dvas/tools/gdps/gdps.py

@fpavogt fpavogt added the enhancement New feature or request label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help !!! Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant