- Nov 16, 2020
- 5
- 1
File "python-packages/urllib3/util/queue.py", line 7, in <module>
File "/data/games/CorruptedKingdoms-0.11.7-pc/renpy/loader.py", line 985, in load_module
exec(code, mod.__dict__)
File "python-packages/urllib3/util/Queue.py", line 10, in <module>
AttributeError: 'module' object has no attribute 'Queue'
First I would like to mention how much I don't like that game, so if I sound grumpy, that's why.Hi,
First of all, thank you for this very informative and helpful gaming on Linux thread.
I have a very peculiar issue when trying to play one particular 7.4.5 RenPy game, Corrupted Kingdom https://f95zone.to/threads/31912/ I am pretty sure it has something to do with my linux setup (the game and installation archive were fine) and I hope someone very experience with linux, python and RenPy can help. I already posted this issue on the game thread itself but since it is not the game issue, no one else have this issue, thus were unable to help.
The game starts, splash screen/loading screen was displayed but as soon the progress bar completed, the game errors out. I am not very familiar with python and RenPy so I had 'noobishly' troubleshoot the issue by brute force trial and error. In the beginning, I tried running via wine, tried multiple versions (v0.11.6 compressed, v0.11.7 compressed and v0.11.7 full) but to no avail. Then, I extracted the script.rpa file using UnRen to read the code and try to understand what is going on.
After few hours tinkering, I figured out the issue is. The developer had included discord integration module/library, which required a custom/modified version of the urllib3 for handling Queue (I think it is related to connection pooling). The modules/libraries (not exactly sure which ones) were made to be compatible with both python2 and python3 (there is a bundled python 2.7 in the game lib folder). Maybe there is python conflict on my machine that resulted in game error when it loads the python-packages/urllib3/util/queue.py (error snippets below).
File "python-packages/urllib3/util/queue.py", line 7, in <module>
File "/data/games/CorruptedKingdoms-0.11.7-pc/renpy/loader.py", line 985, in load_module
exec(code, mod.__dict__)
File "python-packages/urllib3/util/Queue.py", line 10, in <module>
AttributeError: 'module' object has no attribute 'Queue'
I have no idea where this Queue.py file is. I could only find queue.py. So, what I did was comment out some codes that are calling/importing the queue.py file and the game runs. So now I know the issue is not with the game itself but my linux environment. Somehow there is a conflict that cause the import statement to fail. Attached are the log and traceback file.
I found out that I had both python2 and python3 installed hence I had removed python2 using Synaptics Package Manager but the issue still persist.
Thank you in advance.
import Queue
with Queue = None
, but that most likely won't work.Woah! A lot more complicated than I thought. I was thinking that I had made an obvious noob mistake somehow. Thank you for your quick response. I actually did comment out the discord_rpc stuff so that queue.py never gets called and the game runs and playable. I did notice about the 7.3.5 script version during error. The log shows 7.4.5 script version (after commenting out discord_rpc stuff). Definitely do not trouble thyself to debug or troubleshoot this issue. I'm just very curious and taking this opportunity to learn a little bit more about linux, python and RenPy. Cheers.First I would like to mention how much I don't like that game, so if I sound grumpy, that's why.
I would like to mention it is trying to enforce Ren'Py 7.3.5 as script version policy, while having Ren'Py 7.4.5 built-in.
If it is explicitly stating to downgrade the script parser to 7.3.5, you should be able to replace the renpy files with 7.3.5's version if you think it could be worth a shot. Probably won't change anything, but it is nice to know that's an option.
(In other hand, this could also be caused by extraction issues. It is somewhat rare for a developer to set a script version policy themselves, usually they let Ren'Py do it automatically during the build process. You might want to extract the game to a new folder and try again just in case.)
Debian Bullseye did remove Python 2 support; A possibly "easy" solution could be fetchingYou must be registered to see the linksrepository and installing it system-wide. With any luck, that could fix out-of-box your issues.
Keep in mind Linux is case-sensitive (queue.py and Queue.py are different files), and so is Mac. Ren'Py is also case-sensitive (by choice), but it won't track Python modules; So obviously an inconsistent naming may cause conflicts. Furthermore, several core libraries - specially the cryptographic libraries - rely on the operational system. Because that they are error-prone.
With any luck, backporting system-wide Python 2.7 support will magically fix the cryptographic libraries (with a version which shouts a DeprecationWarning every HTTP request but whatever).
Anyway, my advise would be getting rid of Discord implementation altogether. (There is even a discord_rpc version which is a single file instead of a folder, but whatever). That is not the easiest way, but in my opinion, it beats doing system-wide changes.
Well, usually I would download the game, get the file in question, remove the imports and change the functions to return some placeholder data myself, but as I said on the disclaimer, I would rather not have this specific game on my computer; So I'm afraid you'll either need to do that by yourself, or send the zipped python-packages folder. OR attempt the system-wide install solution, might also work.
You might also try blacklisting the game on your firewall and see if that'll make it behave any differently, but iirc Debian Bullseye also replaced iptables, so I have no guide for you about that. You can also edit the file and replace
import Queue
withQueue = None
, but that most likely won't work.
In fact, if Queue there is the multiprocess Queue, that might cause a mess, so... be careful, please? =)
Not sure why you tried to play it through Wine since all RenPy games run natively on Linux.Woah! A lot more complicated than I thought. I was thinking that I had made an obvious noob mistake somehow. Thank you for your quick response. I actually did comment out the discord_rpc stuff so that queue.py never gets called and the game runs and playable. I did notice about the 7.3.5 script version during error. The log shows 7.4.5 script version (after commenting out discord_rpc stuff). Definitely do not trouble thyself to debug or troubleshoot this issue. I'm just very curious and taking this opportunity to learn a little bit more about linux, python and RenPy. Cheers.
First I would like to correct a mistake I did.Not sure why you tried to play it through Wine since all RenPy games run natively on Linux.
Have you tried to delete the game's persistent files in your hidden RenPy folder in your home directory (.renpy/CorruptedKingdoms)?
Normally you should have both version of Python installed on your system. I have Python 2.7.18 and 3.8.10 installed while Python 2 is set as my standard.
As far as I remember support for Python 3 in RenPy isn't fully implanted yet.
Can't say much about it since I upgrade to Ubuntu Focal from Xenial.So Ubuntu Focal, Impish and Hirsute, as well as Debian Bullesye, Bookworm, Sid and Experimental, most likely will no longer come with Python 2 pre-installed (or served as default).
I tried the game myself and had no issue with it, that's why I suggest a fresh attempt before launching the game.By the way, the problem does seem to be on the embedded Discord RPC library; At very least the logs are not pointing for anything blatantly wrong on your setup.
Python 2.7
AFAIK python versions do no matter since it's all a part of renpy runtime and usually you can't play a game with some different runtime. You need the same(ish) runtime version the dev used at the very least.Python
Don't worry no one claimed that there is an issue with the game. I tested the game to see if it will crash due to the discord integration module etc.cold_arctus pazkero Mitsuna
Thank you for your response adding to the discussion. Indeed there is no issue with the Corrupted Kingdoms game. I did not make that claim but if you have misuderstood or have the wrong impression that I did, then I am sorry for not explaining myself clearly. I was trying to figure out what so 'special' about my linux setup/environment which prevented me from playing this one particular game. I have been playing a lot of games from this site on linux for at least a year now without issue. Cheers.
Did you check tracebex.txt or log.txt? Any problem should be written there.cold_arctus pazkero Mitsuna
Thank you for your response adding to the discussion. Indeed there is no issue with the Corrupted Kingdoms game. I did not make that claim but if you have misuderstood or have the wrong impression that I did, then I am sorry for not explaining myself clearly. I was trying to figure out what so 'special' about my linux setup/environment which prevented me from playing this one particular game. I have been playing a lot of games from this site on linux for at least a year now without issue. Cheers.
Scroll up. He posted his traceback.txt and Pazkero pointed out what the issue is.Did you check tracebex.txt or log.txt? Any problem should be written there.
Sorry, I have been working double shift today. Complete lack of focus from my side.Scroll up. He posted his traceback.txt and Pazkero pointed out what the issue is.
I understand Your current state.Hey so I'm trying to play this game on Linux (Manjaro specifically) and it wouldn't work at all with wine.
Did the NWjs patch and it runs, but now I get an audio error: "failed to load /audio/se/slash13.ogg".
I checked the folder and the file is there, not sure if this issue is related to the patch. Any help is greatly appreciated!
Check if the file is named "slash13.ogg" and not "Slash13.ogg". Linux is case sensitive while on Windows it doesn't matter.Hey so I'm trying to play this game on Linux (Manjaro specifically) and it wouldn't work at all with wine.
Did the NWjs patch and it runs, but now I get an audio error: "failed to load /audio/se/slash13.ogg".
I checked the folder and the file is there, not sure if this issue is related to the patch. Any help is greatly appreciated!
My mistake.Check if the file is named "slash13.ogg" and not "Slash13.ogg". Linux is case sensitive while on Windows it doesn't matter.
Edit: It should be named the same as shown in the error message.