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

Pyinstaller compatibility #21

Closed
ExtraMobs opened this issue Oct 3, 2019 · 5 comments
Closed

Pyinstaller compatibility #21

ExtraMobs opened this issue Oct 3, 2019 · 5 comments

Comments

@ExtraMobs
Copy link

After compiling with Pyinstaller, it has to read the 'enumerators' folder, after compiling the script runs with the following error:

'No module named screeninfo.enumerator'

I really like this lib for python, only I'm limited to using version 0.3.1

Commit:
5692fea#diff-09c2bd5a7e56a77a803942fee7c0e70e

@rr-
Copy link
Owner

rr- commented Oct 4, 2019

enumerator is not referenced anywhere, only enumerators. Are you sure you compiled this module in? I don't know the first thing about pyinstaller.

@ExtraMobs
Copy link
Author

ExtraMobs commented Oct 9, 2019

When you interpret in Python, basically enumerator. is a String, so it is implied which enumerator will be imported, because Python looks in the folder where the enumerator is at runtime. When compiled for Pyinstaller, as enumerator. is in a String, pyinstaller interprets as a string and does not compile the enumerators because it has no explicit import, meaning it does not find the enumerators.

@rr-
Copy link
Owner

rr- commented Oct 9, 2019

I do not have the expertise to solve this issue. A pull request would be encouraged. IMO this is a problem with your configuration of pyinstaller rather than screeninfo:

https://stackoverflow.com/a/40609836

@rr-
Copy link
Owner

rr- commented Nov 1, 2019

@ExtraMobs I reduced the magic that happens around enumerator imports. Let me know if it works for you.

@rr-
Copy link
Owner

rr- commented Nov 5, 2019

Released as 0.5. In case there are any problems, let me know via new issues.

@rr- rr- closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants