[GH-ISSUE #184] Can't access file #168

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

Originally created by @toivocat on GitHub (Jul 26, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/184

It gives me this error at the bottom:

win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryEx', 'The file cannot be accessed by the system')

Project output will not be moved to output folder
Complete.

But it was working a few weeks ago.

Originally created by @toivocat on GitHub (Jul 26, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/184 It gives me this error at the bottom: win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryEx', 'The file cannot be accessed by the system') Project output will not be moved to output folder Complete. But it was working a few weeks ago.
kerem 2026-02-26 12:20:41 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

Have you read the help post that is linked at the bottom of the UI after each build (and many other places)? I discuss this issue in it.

Also, #166, #141 already discuss this.

<!-- gh-comment-id:887233636 --> @brentvollebregt commented on GitHub (Jul 27, 2021): Have you read the help post that is linked at the bottom of the UI after each build (and many other places)? I discuss this issue in it. Also, #166, #141 already discuss this.
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

And yes I looked at it.

<!-- gh-comment-id:887460081 --> @toivocat commented on GitHub (Jul 27, 2021): And yes I looked at it.
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

Are you using Python from the Windows Store?

<!-- gh-comment-id:887465773 --> @brentvollebregt commented on GitHub (Jul 27, 2021): Are you using Python from the Windows Store?
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

no

<!-- gh-comment-id:887466636 --> @toivocat commented on GitHub (Jul 27, 2021): no
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

Are you using Windows? If so, could you execute "where python" in cmd and pass the output here.

Also, how are you running auto-py-to-exe? I didn't see this in the issue description.

<!-- gh-comment-id:887468592 --> @brentvollebregt commented on GitHub (Jul 27, 2021): Are you using Windows? If so, could you execute "where python" in cmd and pass the output here. Also, how are you running auto-py-to-exe? I didn't see this in the issue description.
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

it says it's here: C:\Users\Diana\AppData\Local\Microsoft\WindowsApps\python.exe

<!-- gh-comment-id:887469587 --> @toivocat commented on GitHub (Jul 27, 2021): it says it's here: C:\Users\Diana\AppData\Local\Microsoft\WindowsApps\python.exe
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

My name isn't Diana this was my gramas computer that she gave to me

<!-- gh-comment-id:887470910 --> @toivocat commented on GitHub (Jul 27, 2021): My name isn't Diana this was my gramas computer that she gave to me
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

That output shows that whenever you execute "python", it is using Python from the Windows store.

How are you running auto-py-to-exe? If you are running it using auto-py-to-exe from cmd, can you pass the result of where auto-py-to-exe.

<!-- gh-comment-id:887472680 --> @brentvollebregt commented on GitHub (Jul 27, 2021): That output shows that whenever you execute "python", it is using Python from the Windows store. How are you running auto-py-to-exe? If you are running it using `auto-py-to-exe` from cmd, can you pass the result of `where auto-py-to-exe`.
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

I downloaded it from pip and I have a shortcut on my desktop

<!-- gh-comment-id:887474476 --> @toivocat commented on GitHub (Jul 27, 2021): I downloaded it from pip and I have a shortcut on my desktop
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

because the cmd commands don't work.

<!-- gh-comment-id:887474928 --> @toivocat commented on GitHub (Jul 27, 2021): because the cmd commands don't work.
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

Could you just send me the code? Then I could copy then past it in a .py file because I know it was made with tkinter.

<!-- gh-comment-id:887476565 --> @toivocat commented on GitHub (Jul 27, 2021): Could you just send me the code? Then I could copy then past it in a .py file because I know it was made with tkinter.
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

Cool, that hints to me that it will be using the default Python distribution which is most likely Python from the Windows Store.

Unless you can show me different, that it's not using Python from the Windows Store, then I say this is your issue (as outlined in the other issues and the help post).

<!-- gh-comment-id:887476913 --> @brentvollebregt commented on GitHub (Jul 27, 2021): Cool, that hints to me that it will be using the default Python distribution which is most likely Python from the Windows Store. Unless you can show me different, that it's not using Python from the Windows Store, then I say this is your issue (as outlined in the other issues and the help post).
Author
Owner

@brentvollebregt commented on GitHub (Jul 27, 2021):

Could you just send me the code?

This is a git repo, all the code is right here for you??

<!-- gh-comment-id:887477718 --> @brentvollebregt commented on GitHub (Jul 27, 2021): > Could you just send me the code? This is a git repo, all the code is right here for you??
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

I downloaded python from python.org/downloads/

<!-- gh-comment-id:887477997 --> @toivocat commented on GitHub (Jul 27, 2021): I downloaded python from python.org/downloads/
Author
Owner

@toivocat commented on GitHub (Jul 27, 2021):

It downloads two .py files nether of them work.

<!-- gh-comment-id:887481022 --> @toivocat commented on GitHub (Jul 27, 2021): It downloads two .py files nether of them work.
Author
Owner

@brentvollebregt commented on GitHub (Jul 28, 2021):

Please follow the README on how to install and run the application - of course downloading the two individual Python scripts will not work, you do not have all the dependent files.

From the information you have provided above, I do not believe you are running the tool with a Python distribution that is not from the Windows Store. You may have installed another distribution from python.org but potentially have not configured your environment correctly to use this distribution.

<!-- gh-comment-id:888019897 --> @brentvollebregt commented on GitHub (Jul 28, 2021): Please follow the [README](https://github.com/brentvollebregt/auto-py-to-exe) on how to install and run the application - of course downloading the two individual Python scripts will not work, you do not have all the dependent files. From the information you have provided above, I do not believe you are running the tool with a Python distribution that is not from the Windows Store. You may have installed another distribution from python.org but potentially have not configured your environment correctly to use this distribution.
Author
Owner

@toivocat commented on GitHub (Jul 28, 2021):

I can't because those commands are for linux I think but they don't work in cmd.

<!-- gh-comment-id:888287238 --> @toivocat commented on GitHub (Jul 28, 2021): I can't because those commands are for linux I think but they don't work in cmd.
Author
Owner

@brentvollebregt commented on GitHub (Jul 28, 2021):

@toivocat can you please point out the commands that "are for linux".
As far as I'm aware, they will work on Windows regarding you have Python installed (and git if you are installing via GitHub).

<!-- gh-comment-id:888588863 --> @brentvollebregt commented on GitHub (Jul 28, 2021): @toivocat can you please point out the commands that "are for linux". As far as I'm aware, they will work on Windows regarding you have Python installed (and git if you are installing via GitHub).
Author
Owner

@toivocat commented on GitHub (Jul 28, 2021):

$ pip install auto-py-to-exe
$ auto-py-to-exe
$ git clone https://github.com/brentvollebregt/auto-py-to-exe.git
$ cd auto-py-to-exe
$ python setup.py install
$ auto-py-to-exe

cmd gives me this error:
'$' is not recognized as an internal or external command,
operable program or batch file.

<!-- gh-comment-id:888623624 --> @toivocat commented on GitHub (Jul 28, 2021): $ pip install auto-py-to-exe $ auto-py-to-exe $ git clone https://github.com/brentvollebregt/auto-py-to-exe.git $ cd auto-py-to-exe $ python setup.py install $ auto-py-to-exe cmd gives me this error: '$' is not recognized as an internal or external command, operable program or batch file.
Author
Owner

@brentvollebregt commented on GitHub (Jul 29, 2021):

You don't need to execute $

<!-- gh-comment-id:888709125 --> @brentvollebregt commented on GitHub (Jul 29, 2021): You don't need to execute `$`
Author
Owner

@toivocat commented on GitHub (Jul 29, 2021):

ok but if I just type in auto-py-to-exe it says:

'auto-py-to-exe' is not recognized as an internal or external command,
operable program or batch file.

<!-- gh-comment-id:889111951 --> @toivocat commented on GitHub (Jul 29, 2021): ok but if I just type in auto-py-to-exe it says: 'auto-py-to-exe' is not recognized as an internal or external command, operable program or batch file.
Author
Owner

@brentvollebregt commented on GitHub (Jul 29, 2021):

Have you installed auto-py-to-exe?

<!-- gh-comment-id:889402345 --> @brentvollebregt commented on GitHub (Jul 29, 2021): Have you installed auto-py-to-exe?
Author
Owner

@toivocat commented on GitHub (Jul 29, 2021):

yes

<!-- gh-comment-id:889470805 --> @toivocat commented on GitHub (Jul 29, 2021): yes
Author
Owner

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

If you installed auto-py-to-exe, there should be a binary file in the "Scripts" folder in the root of your Python distribution (something like C:\Python37 - will depend on where you put it when you installed it) named auto-py-to-exe.exe - does this exist? If not, then it has not been installed.

<!-- gh-comment-id:889849737 --> @brentvollebregt commented on GitHub (Jul 30, 2021): If you installed auto-py-to-exe, there should be a binary file in the "Scripts" folder in the root of your Python distribution (something like `C:\Python37` - will depend on where you put it when you installed it) named `auto-py-to-exe.exe` - does this exist? If not, then it has not been installed.
Author
Owner

@toivocat commented on GitHub (Jul 30, 2021):

it says it's here:
C:\Users\Diana\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts

also at the bottom it sayes:
WARNING: The scripts auto-py-to-exe.exe and autopytoexe.exe are installed in 'C:\Users\Diana\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

do you know how I can fix that

<!-- gh-comment-id:889882261 --> @toivocat commented on GitHub (Jul 30, 2021): it says it's here: C:\Users\Diana\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts also at the bottom it sayes: WARNING: The scripts auto-py-to-exe.exe and autopytoexe.exe are installed in 'C:\Users\Diana\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. do you know how I can fix that
Author
Owner

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

You said you were not using Python from the Windows Store, but right there it shows you still are. How do I know? Read this.

Python from the Windows Store is not supported when not using a virtual environment.

Also, these GitHub issues are for issues about the tool auto-py-to-exe - however every question except your first one seems to be about your own environment setup.

<!-- gh-comment-id:890229155 --> @brentvollebregt commented on GitHub (Jul 30, 2021): You said you were not using Python from the Windows Store, but right there it shows you still are. How do I know? [Read this](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#loadlibraryex-the-file-cannot-be-accessed-by-the-system). Python from the Windows Store is not supported when not using a virtual environment. Also, these GitHub issues are for issues about the tool auto-py-to-exe - however every question except your first one seems to be about your own environment setup.
Author
Owner

@toivocat commented on GitHub (Jul 30, 2021):

You idiot how many times did I say I got it from python.org/downloads/? I also don't get stuff from the windows store on by computer because one the windows store has slow downloads and two my computer is really slow witch would take it like a day to download python!

<!-- gh-comment-id:890249080 --> @toivocat commented on GitHub (Jul 30, 2021): You idiot how many times did I say I got it from python.org/downloads/? I also don't get stuff from the windows store on by computer because one the windows store has slow downloads and two my computer is really slow witch would take it like a day to download python!
Author
Owner

@toivocat commented on GitHub (Nov 13, 2021):

Sorry about all this. I finally figured it out! It has nothing to do with this it is my stupid anti-virus software which keeps putting the executable in quarantine!

EDIT:

I also wasn't using python from the windows store.

<!-- gh-comment-id:967754663 --> @toivocat commented on GitHub (Nov 13, 2021): Sorry about all this. I finally figured it out! It has nothing to do with this it is my stupid anti-virus software which keeps putting the executable in quarantine! **EDIT:** I also wasn't using python from the windows store.
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#168
No description provided.