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 fails to ship apscheduler #131

Closed
janscas opened this Issue Apr 22, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@janscas

janscas commented Apr 22, 2016

When using pyinstaller to distribute an application it fails to add apscheduler.

It raises a DistributionNotFound error.

I have checked all the posibilites and it seems that the apscheduler code is making some "on the run imports" and therefore pyinstaller does not found the packages it needs to integrate.

However the pyinstaller distribution package can be made succesfully using a "hook file" (https://pythonhosted.org/PyInstaller/#understanding-pyinstaller-hooks) but I can't found the tweaks I need to do inside the hook to let pyinstaller know which imports are needed and where to find them...

I have tested this running python 2.7 on windows 7.

Can anyone help?

error

@janscas

This comment has been minimized.

Show comment
Hide comment
@janscas

janscas Apr 22, 2016

I've been able to skip this error by changing the init.py file and simply setting "version='3.1.0'.

Now the exe is generated without errors but when executed it raises LookupError: No trigger by the name "interval" was found.

It has something to do with the imports done by pyinstaller because when working with the .py program it works like a charm.

error2

janscas commented Apr 22, 2016

I've been able to skip this error by changing the init.py file and simply setting "version='3.1.0'.

Now the exe is generated without errors but when executed it raises LookupError: No trigger by the name "interval" was found.

It has something to do with the imports done by pyinstaller because when working with the .py program it works like a charm.

error2

@janscas

This comment has been minimized.

Show comment
Hide comment
@janscas

janscas Apr 22, 2016

I've found the solution for this problem here:

https://groups.google.com/forum/#!searchin/apscheduler/lookuperror/apscheduler/OR3MSBHwd8Q/0BzP3xpuGmAJ

The solutions consists on importing the trigger and setup directly.

from apscheduler.triggers.interval import IntervalTrigger

trigger = IntervalTrigger(hours=24, start_date=start_date)

janscas commented Apr 22, 2016

I've found the solution for this problem here:

https://groups.google.com/forum/#!searchin/apscheduler/lookuperror/apscheduler/OR3MSBHwd8Q/0BzP3xpuGmAJ

The solutions consists on importing the trigger and setup directly.

from apscheduler.triggers.interval import IntervalTrigger

trigger = IntervalTrigger(hours=24, start_date=start_date)

@janscas janscas closed this Apr 22, 2016

@jainmehul

This comment has been minimized.

Show comment
Hide comment
@jainmehul

jainmehul Jun 24, 2016

Hi, I am having the same issue, as the first one. which init.py did you modify?
I get the error of DistributionNotFound while running the exe.

jainmehul commented Jun 24, 2016

Hi, I am having the same issue, as the first one. which init.py did you modify?
I get the error of DistributionNotFound while running the exe.

@janscas

This comment has been minimized.

Show comment
Hide comment
@janscas

janscas Jul 11, 2016

Just modify the appscheduler/init.py

and set it to:

version_info = (3, 1, 0)
version = '3.1.0'
release = '3.1.0'

janscas commented Jul 11, 2016

Just modify the appscheduler/init.py

and set it to:

version_info = (3, 1, 0)
version = '3.1.0'
release = '3.1.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment