shadoxxhd / steamworkshopdownloader

download steam workshop items via steamcmd
304 stars 47 forks source link

Unable to run download.exe #20

Closed robbely closed 2 years ago

robbely commented 2 years ago

I am unable to get this program to work (tried v0.5.2 and 0.5.0). When I run downloader.exe it seems to do something silently for a few seconds, then I get the error "_tkinter.TclError: Can't find a usable init.tcl"

asuninhadoquero commented 2 years ago

mochi mochi, im asuna i have problem how to login from downloader.exe for steamcmd this bug is passw is failed

asuninhadoquero commented 2 years ago

image

robbely commented 2 years ago

mochi mochi, im asuna i have problem how to login from downloader.exe for steamcmd this bug is passw is failed

Please start a new thread with this issue rather than derailing this thread. This thread is about not being able to start download.exe with the error given in the OP.

shadoxxhd commented 2 years ago

I am unable to get this program to work (tried v0.5.2 and 0.5.0). When I run downloader.exe it seems to do something silently for a few seconds, then I get the error "_tkinter.TclError: Can't find a usable init.tcl"

What OS are you using? Can you post the full error text?

robbely commented 2 years ago

Many thanks for the reply. I am using WIndows 10 x64 Pro (latest). The full error is:

Traceback (most recent call last):
  File "downloader.py", line 230, in <module>
  File "downloader.py", line 193, in main
  File "tkinter\__init__.py", line 2262, in __init__
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    {C:\Users\bob\AppData\Local\Temp\_MEI286602\tcl} C:/Users/bob/AppData/Local/Temp/_MEI286602/tcl8.6 C:/Users/bob/AppData/Local/Temp/lib/tcl8.6 C:/Users/bob/Desktop/lib/tcl8.6 C:/Users/bob/Desktop/library C:/tcl8.6.9/library

This probably means that Tcl wasn't installed properly.

[34092] Failed to execute script 'downloader' due to unhandled exception!

I'm wondering if there is a conflict with another installed app that uses Tcl/Tk. I found a copy of the libraries and put them in Desktop\lib and the program works. I don't want to keep a lib folder on the desktop though. Is there a way to make download.exe independent of external libraries (assuming this is the cause of the issue)?

shadoxxhd commented 2 years ago

It should already be independent. Pyinstaller works by packaging everything into one binary, which is then extracted to the temp folder (the _MEI286602 folder in your case) when running. For most users, the tcl library unpackes correctly already.

A conflict may be possible if the installer thinks tcl already exists on the system, but then can't access it. Does the path C:/tcl8.6.9/library exist on your system?

robbely commented 2 years ago

None of the folders suggested by the error exist on my system (except for the Desktop\lib one which I manually added myself). The _MEI286602 is also missing - maybe the app cleans up after the error or perhaps it has some sort of write issue to the Temp folder (though I have no idea why that might be). Do you have an unpacked version of the app I could try instead?

shadoxxhd commented 2 years ago

When the app closes, it should usually clean up.

If you want to run this app without using the pyinstaller executable, you need to install python on your system and run the downloader.py file with it.

robbely commented 2 years ago

I tried download.py with python that I already had installed and it gave syntax errors (I think it may have been quite an old version). I updated to 3.10 and now it opens a black box briefly and then closes. There doesn't appear to be a message in the box.

I tried download.exe in a windows sandbox and it works as it should, so there is something it doesn't like about my system. I tried it (not in the sandbox) with python uninstalled and also with the updated version installed in case that was the issue, but still the same error.

shadoxxhd commented 2 years ago

Could you somehow create a snapshot of the temp folder it creates? I'm interested in whether it correctly extracts the files.

For the python version, try executing it from the console to see the error output.

robbely commented 2 years ago

Could you somehow create a snapshot of the temp folder it creates? I'm interested in whether it correctly extracts the files.

I tried to capture this but it appeared to either get deleted very quickly or not be written in the first place. As a experiment I pointed my TEMP/TMP environment variables to a different folder and this time the program ran ok. I use a ramdrive for my tmp folder (which I dont want to change) but haven't run into permissions issues in the past. I tried running the program elevated and it still didnt work.

Is there a way to put the unpacked libraries somewhere else where they will be found? Unfortunately none of the folders suggested in the error message would be a good place.

For the python version, try executing it from the console to see the error output.

I'm using the windows store version of python and it still opens another window briefly and closes. I will add trying the non-store version to my to-try list.

shadoxxhd commented 2 years ago

I'm also using a ramdisk for my TEMP and am not encountering any issues. Perhaps your TEMP is almost full or inaccessible?

robbely commented 2 years ago

I'm also using a ramdisk for my TEMP and am not encountering any issues. Perhaps your TEMP is almost full or inaccessible?

There is still plenty of space, and the extracted files aren't very big. What ramdisk software are you using? I'm using ImDisk.

shadoxxhd commented 2 years ago

I'm also using ImDisk. One cause for problems that I've noticed some times is that when the actual temp folder is not yet created on the ramdisk (I'm not using the root of the ramdisk as TEMP), some programs fail to create files.

robbely commented 2 years ago

That's a possible reason. Would you expect this to cause a failure every time though, or only some of the time?

shadoxxhd commented 2 years ago

If an application has this problem, it fails every time until another application (or the user) creates the temp folder. If the program still doesn't start after you created that folder, the issue is likely something else.

To test what the problem is, you could temporarily reset your temp directory to a normal drive, and see if the issue persists.

robbely commented 2 years ago

Ahh I see what you mean. That can't be the issue in my case then as the temp folder is created at boot time. Edit: yes I did have a go at pointing the temp variables to a regular folder and the issue went away, so it is likely a wrinkle with ImDisk.

shadoxxhd commented 2 years ago

What options do you use when creating the disk with ImDisk? And how much free RAM/commit do you have after it is created?

shadoxxhd commented 2 years ago

Closing this, since it's not a bug in SWD.

robbely commented 2 years ago

I understand why you closed this, however I have only ever had a temp folder issue with this app.

It would probably be better to have a version that installs everything to a folder, along with the required steamcmd folder and python libraries, rather than creating and deleting temp files each time.

robbely commented 2 years ago

NVM I found one that just works (no jumping through hoops or downloading of temp files to run):

https://github.com/VovoloGames/WorkshopDL