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

SyntaxError with pyinstaller and apscheduler #278

Open
sprototles opened this issue Jul 21, 2021 · 4 comments
Open

SyntaxError with pyinstaller and apscheduler #278

sprototles opened this issue Jul 21, 2021 · 4 comments

Comments

@sprototles
Copy link

Hi
attaching issue from apscheduler here too, since there might be a bug in pyinstaller and not in apscheduler:
https://github.com/agronholm/apscheduler/issues/530

TLDR:
exe file gives an error, apscheduler devs thinks its because of pyinstaller

can you help me solve this issue ?

@rokm rokm transferred this issue from pyinstaller/pyinstaller Jul 21, 2021
@rokm
Copy link
Member

rokm commented Jul 21, 2021

The initial syntax error was caused by something in your environment - asyncio should not have been in site-packages, as apscheduler dev pointed out. (My guess would be you had asyncio package installed, which is unnecessary since python 3.4 and might be actually incompatible with latest python versions, hence the syntax error).

The run-time pkg_resources.DistributionNotFound error is caused by missing metadata, which must be collected manually, for example by adding --copy-metadata tzlocal to your PyInstaller command. In order to get your test program running, I had to use --copy-metadata pytz --copy-metadata six --copy-metadata setuptools --copy-metadata tzlocal.

This is required by both apscheduler 3.7.0 as well as 3.6.3, so I wonder how our hook was tested against 3.6.3. Either way, it looks like we'll need to update it.

But in the meantime, you can collect that metadata manually, as shown above.

@rokm
Copy link
Member

rokm commented Jul 21, 2021

Cross-referencing agronholm/apscheduler#530 for the sake of completeness, as it seems that the reference was lost in the transfer of issue from main to this repository.

@sprototles
Copy link
Author

thank you for the help

@reber0
Copy link

reber0 commented Aug 20, 2021

@sprototles I have the same problem, have you found a solution?

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

3 participants