mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-26 20:25:50 +03:00
[GH-ISSUE #73] File not found when ran as exe #70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Sep 29, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/73
say i'm trying to read from .txt file.
with open( 'file', 'r' ) as file: for line in file.readlines() print( line )It'll say that 'file' does not exist, but if run the same code in Spyder or PyCharm it will run fine
@brentvollebregt commented on GitHub (Sep 30, 2019):
If you're referencing the file relatively to the project, have you added the file you're referencing as an additional file?
Also can you please supply the command that is shown at the bottom of the UI.
@ghost commented on GitHub (Oct 1, 2019):
Oh I don’t think so, think I was added the folders instead lol. I’ll try
that, thanks
On Mon, Sep 30, 2019 at 5:14 AM Brent Vollebregt notifications@github.com
wrote:
@ghost commented on GitHub (Oct 1, 2019):
Getting same issue, when trying to open data from another file it says No such file or directory -> 'C:\Users\User\AppData\Local\Temp\_MEI168562\THEMAINDIR\SUBDIR\SUBDIR2'
Even after adding additional folders. 'THEMAINDIR\SUBDIR\SUBDIR2'.
It works in the IDE but not as exe.
@brentvollebregt commented on GitHub (Oct 2, 2019):
In the debugging help I provide, I state that you should use one directory mode when debugging as it makes it a lot easier to see what's in the output structure.
When using one directory mode, are the files you're trying to access present? You can locate them in the output directory.
@ghost commented on GitHub (Oct 6, 2019):
Yeah the folder is in the output dir, but it renames the the with and 'i' and the beginning of the name... like the folder is added as an additional too.
Actual folder name: Quar.
Error Output: No such file or directory iQuar.
@brentvollebregt commented on GitHub (Oct 6, 2019):
Can you please supply the command that is shown at the bottom of the UI (asked in my first reply)
@ghost commented on GitHub (Oct 6, 2019):
pyinstaller -y -i "C:/Users/User/OneDrive/Desktop/Hopstarter-Malware-Search.ico" --add-data "C:/Users/User/OneDrive/Desktop/Antimalware X/poison/iQUAR";"iQUAR/" "C:/Users/User/OneDrive/Desktop/Antimalware X/127Sec.py"
@brentvollebregt commented on GitHub (Oct 6, 2019):
The section
shows that you have specified for the
iQUARfolder to be put into theiQUAR/directory. Is this not what you have specified in the UI?@ghost commented on GitHub (Oct 6, 2019):
no i was just adding the folder to see if it would work
@brentvollebregt commented on GitHub (Oct 6, 2019):
What are you expecting to happen? You have specified that the folder is copied to the
iQUARdirectory, why would it then be put itQuarwhen you have not told it to be copied there?@ghost commented on GitHub (Oct 6, 2019):
So if i don't add that folder and an additional i still get
@ghost commented on GitHub (Oct 6, 2019):
My goal is too move files into iQUAR\susmalware directory... but when turned into an exe the programs doesn't work, but will work fine in the ide.
@brentvollebregt commented on GitHub (Oct 6, 2019):
In the command you have shown me, you've told the application to copy the folder to
iQUAR/. Why do you then expect it to be copied toiiQUARwhen you have explicitly told it to copy toiQUAR/?@ghost commented on GitHub (Oct 6, 2019):
In my project there is no folder named 'iiQUAR', only with a single 'i'.
So idk where it's getting 'C:\Users\User\output\127Sec\poison\iiQUAR\susmalware' from when the actual path is 'C:\Users\User\output\127Sec\poison\iQUAR\susmalware'
@brentvollebregt commented on GitHub (Oct 6, 2019):
Can you please provide a minimal reproducible example of this and the command you use to bundle the exe? I do not want to see your whole script, just the section that can reproduce this issue.
@ghost commented on GitHub (Oct 6, 2019):
Error starts here:
shutil.move( file, __file__[:-13]+'{}'.format( 'iQUAR\\susmalware' ) )One directory mode: > pyinstaller -y -i "C:/Users/User/OneDrive/Desktop/Hopstarter-Malware-Search.ico" "C:/Users/Users/OneDrive/Desktop/Antimalware X/127Sec.py"
@brentvollebregt commented on GitHub (Oct 6, 2019):
That command does not include the copying of files/directories whatsoever and can you please give a minimal reproducible example (that actually runs), not just one line.
@ghost commented on GitHub (Oct 6, 2019):
yeah i can, the thing is that the directory iQUAR is built into the exe, so it's not just a random made folder on the desktop or something.
@brentvollebregt commented on GitHub (Oct 7, 2019):
I cannot help if I cannot reproduce this situation myself.
Please provide a minimal reproducible example of what you are trying to do that demonstrates the
iiQUARfolder creation.@brentvollebregt commented on GitHub (Oct 20, 2019):
It seems like "Billy" deleted their account so I don't imagine this will be getting resolved. Closing due to this reason.