[GH-ISSUE #439] in __init__ self.files = [PackagePath(i) for i in self.raw["files"]] KeyError: 'files' #350

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

Originally created by @kkaskie on GitHub (Nov 3, 2023).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/439

Originally assigned to: @kkaskie on GitHub.

Hello,

I keep running into this error "line 97, in init self.files = [PackagePath(i) for i in self.raw["files"]] KeyError: 'files'". The interface will load but none of the buttons are operational.

Describe the bug
A clear and concise description of what the bug is. If you have an error message, please paste it here (not in a screenshot).
Traceback (most recent call last):

Initially ran auto-py-to-exe-2.9.0 and things worked fine. Some time has past sence last used and the below error occured. Updated the packages and running auto-py-to-exe-2.41.0 now with the same outcome.

File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\eel_init_.py", line 281, in _process_message
return_val = _exposed_functionsmessage['name']
File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\ui.py", line 45, in initialise
'options': packaging.get_pyinstaller_options(),
File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\packaging.py", line 43, in get_pyinstaller_options
parser = __get_pyinstaller_argument_parser()
File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\packaging.py", line 22, in __get_pyinstaller_argument_parser
from PyInstaller.building.build_main import _add_options as add_build_options
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\build_main.py", line 28, in
from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\api.py", line 32, in
from PyInstaller.building.splash import Splash # argument type validation in EXE
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\splash.py", line 24, in
from PyInstaller.utils.hooks import tcl_tk as tcltk_utils
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks_init
.py", line 1272, in
from PyInstaller.utils.hooks import conda as conda_support # noqa: F401
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 385, in
distributions = _init_distributions()
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 380, in _init_distributions
dist = Distribution(path)
File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 97, in init
self.files = [PackagePath(i) for i in self.raw["files"]]
KeyError: 'files'

To Reproduce
Steps to reproduce the behavior (install dependencies, do this in the auto-py-to-exe UI):

  1. Execute run.py

Your Environment:

  • Python version (python --version): 3.19.16
  • auto-py-to-exe version (pip show auto-py-to-exe): 2.9.0 and 2.41.0
  • PyInstaller version (pip show pyinstaller): 6.1.0
  • Eel version (pip show eel): 0.14.0
Originally created by @kkaskie on GitHub (Nov 3, 2023). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/439 Originally assigned to: @kkaskie on GitHub. Hello, I keep running into this error "line 97, in __init__ self.files = [PackagePath(i) for i in self.raw["files"]] KeyError: 'files'". The interface will load but none of the buttons are operational. **Describe the bug** A clear and concise description of what the bug is. If you have an error message, please paste it here (not in a screenshot). Traceback (most recent call last): Initially ran auto-py-to-exe-2.9.0 and things worked fine. Some time has past sence last used and the below error occured. Updated the packages and running auto-py-to-exe-2.41.0 now with the same outcome. File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\eel\__init__.py", line 281, in _process_message return_val = _exposed_functions[message['name']](*message['args']) File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\ui.py", line 45, in initialise 'options': packaging.get_pyinstaller_options(), File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\packaging.py", line 43, in get_pyinstaller_options parser = __get_pyinstaller_argument_parser() File "C:\Users\cwb725\OneDrive - MT\Desktop\auto-py-to-exe-2.9.0\auto_py_to_exe\packaging.py", line 22, in __get_pyinstaller_argument_parser from PyInstaller.building.build_main import __add_options as add_build_options File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\build_main.py", line 28, in <module> from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\api.py", line 32, in <module> from PyInstaller.building.splash import Splash # argument type validation in EXE File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\building\splash.py", line 24, in <module> from PyInstaller.utils.hooks import tcl_tk as tcltk_utils File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\__init__.py", line 1272, in <module> from PyInstaller.utils.hooks import conda as conda_support # noqa: F401 File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 385, in <module> distributions = _init_distributions() File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 380, in _init_distributions dist = Distribution(path) File "C:\Users\cwb725\AppData\Roaming\Python\Python39\site-packages\PyInstaller\utils\hooks\conda.py", line 97, in __init__ self.files = [PackagePath(i) for i in self.raw["files"]] KeyError: 'files' **To Reproduce** Steps to reproduce the behavior (install dependencies, do this in the auto-py-to-exe UI): 1. Execute run.py **Your Environment:** - Python version (`python --version`): 3.19.16 - auto-py-to-exe version (`pip show auto-py-to-exe`): 2.9.0 and 2.41.0 - PyInstaller version (`pip show pyinstaller`): 6.1.0 - Eel version (`pip show eel`): 0.14.0
kerem 2026-02-26 12:21:18 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2023):

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

<!-- gh-comment-id:1792894136 --> @github-actions[bot] commented on GitHub (Nov 3, 2023): 👋 Hi, just a reminder that if you haven't read [the help post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/) yet, give it a read to see if your issue is covered in it and make sure to follow [the debugging section](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging). Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help [post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/), [video](https://youtu.be/OZSZHmWSOeM) or create a [new discussion](https://github.com/brentvollebregt/auto-py-to-exe/discussions).
Author
Owner

@brentvollebregt commented on GitHub (Nov 3, 2023):

Line 97 in which file? That doesn't look like it comes from this project.

Please fill out the template you cleared so we have all the information required to look into this.

<!-- gh-comment-id:1793065710 --> @brentvollebregt commented on GitHub (Nov 3, 2023): Line 97 in which file? That doesn't look like it comes from this project. Please fill out the template you cleared so we have all the information required to look into this.
Author
Owner

@kkaskie commented on GitHub (Nov 3, 2023):

Line 97 in which file? That doesn't look like it comes from this project.

Please fill out the template you cleared so we have all the information required to look into this.

Initial comment has been updated.

<!-- gh-comment-id:1793081432 --> @kkaskie commented on GitHub (Nov 3, 2023): > Line 97 in which file? That doesn't look like it comes from this project. > > Please fill out the template you cleared so we have all the information required to look into this. Initial comment has been updated.
Author
Owner

@brentvollebregt commented on GitHub (Nov 3, 2023):

Those reproduction steps don't give me anything to work off, unfortunately; all I can recommend is to:

  1. Create a new virtual environment
  2. Install your dependencies in this virtual environment
  3. Verify your script runs in this virtual environment
  4. Install auto-py-to-exe in this virtual environment
  5. Run auto-py-to-exe from this virtual environment and package your application
    • Make sure it's from this virtual environment and not the one you're currently using
    • You should be able to use python -m auto_py_to_exe after you have activated the virtual environment

This should hopefully remedy any version errors and stop PyInstaller from trying to bundle conda as it might be getting in the way.

Also just a heads up, the latest version of Python is 3.12 😄

<!-- gh-comment-id:1793107279 --> @brentvollebregt commented on GitHub (Nov 3, 2023): Those reproduction steps don't give me anything to work off, unfortunately; all I can recommend is to: 1. Create a new virtual environment 2. Install your dependencies in this virtual environment 3. Verify your script runs in this virtual environment 4. Install auto-py-to-exe in this virtual environment 5. Run auto-py-to-exe from this virtual environment and package your application - Make sure it's from this virtual environment and not the one you're currently using - You should be able to use `python -m auto_py_to_exe` after you have activated the virtual environment This should hopefully remedy any version errors and stop PyInstaller from trying to bundle conda as it might be getting in the way. _Also just a heads up, the latest version of Python is 3.12 😄_
Author
Owner

@github-actions[bot] commented on GitHub (Dec 4, 2023):

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:1837677282 --> @github-actions[bot] commented on GitHub (Dec 4, 2023): 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 (Dec 10, 2023):

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

<!-- gh-comment-id:1848801454 --> @github-actions[bot] commented on GitHub (Dec 10, 2023): Closing issue due to no activity in more than 60 days.
Author
Owner

@nikbog-mec commented on GitHub (Jan 17, 2024):

I've started having this issue as well. When I run the run.py, I get the KeyError: 'files' as well. I've successfully ran this in the past so I'm not sure what would've changed. I tried to run this on a different machine with a fresh download of auto-py-to-exe and I get the same issue. Currently running on Python 3.9.16. Not sure if this has any web-based dependencies - If it does, it could possibly be a firewall issue in the company.

<!-- gh-comment-id:1894783930 --> @nikbog-mec commented on GitHub (Jan 17, 2024): I've started having this issue as well. When I run the run.py, I get the KeyError: 'files' as well. I've successfully ran this in the past so I'm not sure what would've changed. I tried to run this on a different machine with a fresh download of auto-py-to-exe and I get the same issue. Currently running on Python 3.9.16. Not sure if this has any web-based dependencies - If it does, it could possibly be a firewall issue in the company.
Author
Owner

@brentvollebregt commented on GitHub (Jan 17, 2024):

@nikbog-mec if you follow my last recommendation (virtual env), does it now work for you?

Also as something completely separate, do you have conda installed by any chance?

<!-- gh-comment-id:1894938851 --> @brentvollebregt commented on GitHub (Jan 17, 2024): @nikbog-mec if you follow my last recommendation (virtual env), does it now work for you? Also as something completely separate, do you have conda installed by any chance?
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#350
No description provided.