[GH-ISSUE #245] The system cannot find the path specified #218

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

Originally created by @AmirHosseinCV on GitHub (Feb 21, 2022).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/245

Environment:

Python 3.10 (Installed from python.org) - Virtual environment

Error message:

  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "spotdl\providers\ytm_provider.py", line 18, in <module>
  File "ytmusicapi\ytmusic.py", line 102, in __init__
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\AmirCV\\AppData\\Local\\Temp\\_MEI213882\\ytmusicapi\\locales'
[26528] Failed to execute script 'main' due to unhandled exception!

Imported packages:

SpotDL

My code:

from spotdl.console import console_entry_point
url = input("Enter the url:")
sys.argv = [sys.argv[0], url]
console_entry_point()
Originally created by @AmirHosseinCV on GitHub (Feb 21, 2022). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/245 ### Environment: Python 3.10 (Installed from python.org) - Virtual environment ### Error message: ``` File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module File "spotdl\providers\ytm_provider.py", line 18, in <module> File "ytmusicapi\ytmusic.py", line 102, in __init__ FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\AmirCV\\AppData\\Local\\Temp\\_MEI213882\\ytmusicapi\\locales' [26528] Failed to execute script 'main' due to unhandled exception! ``` ### Imported packages: [SpotDL](https://github.com/spotDL/spotify-downloader) ### My code: ```python from spotdl.console import console_entry_point url = input("Enter the url:") sys.argv = [sys.argv[0], url] console_entry_point() ```
kerem closed this issue 2026-02-26 12:20:51 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Feb 23, 2022):

ytmusicapi has a locales folder that is not automatically included by PyInstaller - you need to manually include it

<!-- gh-comment-id:1048522332 --> @brentvollebregt commented on GitHub (Feb 23, 2022): [ytmusicapi has a locales folder](https://github.com/sigma67/ytmusicapi/tree/master/ytmusicapi/locales) that is not automatically included by PyInstaller - you need to manually include it
Author
Owner

@AmirHosseinCV commented on GitHub (Feb 23, 2022):

@brentvollebregt Thank you so much! It solved the problem. However, I'm still getting many other errors that randomly change after every run. Something like:

pkg_resources.DistributionNotFound: The 'PACKAGE_NAME' distribution was not found and is required by spotdl

Some package names: pytube, yt-dlp, rich, mutagen, requests, BeautifulSoup4, etc.
I tried importing them in my main file and adding them using --hidden-import and --collect-* options, but they didn't solve the problem.
Is it possible to ask it to import all packages installed in my venv (and their files)?

<!-- gh-comment-id:1048733001 --> @AmirHosseinCV commented on GitHub (Feb 23, 2022): @brentvollebregt Thank you so much! It solved the problem. However, I'm still getting many other errors that randomly change after every run. Something like: ``` pkg_resources.DistributionNotFound: The 'PACKAGE_NAME' distribution was not found and is required by spotdl ``` Some package names: `pytube`, `yt-dlp`, `rich`, `mutagen`, `requests`, `BeautifulSoup4`, etc. I tried importing them in my main file and adding them using `--hidden-import` and `--collect-*` options, but they didn't solve the problem. Is it possible to ask it to import all packages installed in my venv (and their files)?
Author
Owner

@brentvollebregt commented on GitHub (Feb 24, 2022):

This looks like a PyInstaller issue - do you still get these errors when using the generated command at the bottom of the UI?

<!-- gh-comment-id:1049536135 --> @brentvollebregt commented on GitHub (Feb 24, 2022): This looks like a PyInstaller issue - do you still get these errors when using the generated command at the bottom of the UI?
Author
Owner

@AmirHosseinCV commented on GitHub (Feb 24, 2022):

@brentvollebregt Yes. So I'll close my issue. Thank you for your time and the great project.

<!-- gh-comment-id:1049575056 --> @AmirHosseinCV commented on GitHub (Feb 24, 2022): @brentvollebregt Yes. So I'll close my issue. Thank you for your time and the great project.
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#218
No description provided.