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

Exe doesn't work #207

Closed
Nextross opened this issue Oct 30, 2021 · 8 comments
Closed

Exe doesn't work #207

Nextross opened this issue Oct 30, 2021 · 8 comments
Labels

Comments

@Nextross
Copy link

I'm using Python 3.9.5. I wrote a script that will display a notification after starting the .exe, but when I tried to start it, it gives me this error:

  File "svatky.py", line 14, in <module>
    toast.show_toast("Dnes má svátek", dnes, duration=5)
  File "win10toast\__init__.py", line 127, in show_toast
  File "win10toast\__init__.py", line 93, in _show_toast
  File "pkg_resources\__init__.py", line 1130, in resource_filename
  File "pkg_resources\__init__.py", line 342, in get_provider
  File "pkg_resources\__init__.py", line 886, in require
  File "pkg_resources\__init__.py", line 772, in resolve
pkg_resources.DistributionNotFound: The 'win10toast' distribution was not found and is required by the application

It worked as a script in terminal. Do you know where it issues could be?

@brentvollebregt
Copy link
Owner

Looks like win10toast is something you should add as a hidden import

@Nextross
Copy link
Author

Still the same error appears. Here's the code, you can have a look.

@brentvollebregt
Copy link
Owner

This does not look like an issue with auto-py-to-exe but the library you are using.

Searching for pkg_resources.DistributionNotFound: The 'win10toast' distribution was not found and is required by the application in Google came up with this: jithurjacob/Windows-10-Toast-Notifications#25 - I recommend you take a look at the issue.

@Legorooj
Copy link

Legorooj commented Nov 2, 2021

@brentvollebregt you may want to consider adding support for some of PyInstaller's new options. This issue should in theory be fixed by adding --copy-metadata=win10toast to the command.

@brentvollebregt
Copy link
Owner

@Legorooj thanks heaps for the tip. I can't see --collect-metadata as a valid argument, maybe you meant --copy-metadata or one of the other --collect-X args?

@Legorooj
Copy link

Legorooj commented Nov 5, 2021

@brentvollebregt my bad, I did mean --copy-metadata haha. I keep calling it the wrong thing because all the others are named differently. Edited my previous comment.

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 5, 2022
@github-actions
Copy link

Closing issue due to no activity in more than 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants