[GH-ISSUE #207] Exe doesn't work #187

Closed
opened 2026-02-26 12:20:46 +03:00 by kerem · 8 comments
Owner

Originally created by @Nextross on GitHub (Oct 30, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/207

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?

Originally created by @Nextross on GitHub (Oct 30, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/207 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: ```Traceback (most recent call last): 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?
kerem 2026-02-26 12:20:46 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@brentvollebregt commented on GitHub (Oct 30, 2021):

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

<!-- gh-comment-id:955189936 --> @brentvollebregt commented on GitHub (Oct 30, 2021): Looks like `win10toast` is something you should add as a hidden import
Author
Owner

@Nextross commented on GitHub (Oct 30, 2021):

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

<!-- gh-comment-id:955194068 --> @Nextross commented on GitHub (Oct 30, 2021): Still the same error appears. [Here](https://pastebin.com/ggKWKuw6)'s the code, you can have a look.
Author
Owner

@brentvollebregt commented on GitHub (Oct 30, 2021):

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.

<!-- gh-comment-id:955605963 --> @brentvollebregt commented on GitHub (Oct 30, 2021): 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.
Author
Owner

@Legorooj commented on GitHub (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.

<!-- gh-comment-id:957779150 --> @Legorooj commented on GitHub (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.
Author
Owner

@brentvollebregt commented on GitHub (Nov 4, 2021):

@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?

<!-- gh-comment-id:960526357 --> @brentvollebregt commented on GitHub (Nov 4, 2021): @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?
Author
Owner

@Legorooj commented on GitHub (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.

<!-- gh-comment-id:961878035 --> @Legorooj commented on GitHub (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.
Author
Owner

@github-actions[bot] commented on GitHub (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.

<!-- gh-comment-id:1005289781 --> @github-actions[bot] commented on GitHub (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.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 11, 2022):

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

<!-- gh-comment-id:1009494550 --> @github-actions[bot] commented on GitHub (Jan 11, 2022): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#187
No description provided.