CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Tutorial Others Playing On Linux - Tutorials, Tools And Help

5.00 star(s) 3 Votes

trapon

New Member
Sep 21, 2021
3
0
Thank you very much for RenPy instructions, I'm totally dummy and that's a lot for me to start

Cheers!
 

JohnF95zone

Engaged Member
Oct 31, 2017
2,016
3,516
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.

View attachment CorruptedKingdoms-0.11.7-log.txt View attachment CorruptedKingdoms-0.11.7-traceback.txt
 
  • Like
Reactions: burrito107
Nov 24, 2019
283
260
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.
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 fetching repository 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 with Queue = 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? =)
 

JohnF95zone

Engaged Member
Oct 31, 2017
2,016
3,516
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 fetching repository 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 with Queue = 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? =)
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.
 
Last edited:

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
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.
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.
 
Nov 24, 2019
283
260
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.
First I would like to correct a mistake I did.

Python 2.7 has reached its EOL in 2020. If I remember correctly, it has been completely removed from OpenBSD, but most distros no longer ship it by default anymore.

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).

However: I believe it is still available on repositories. It is still active on Debian Tracker ( ) and listed ( ). Same goes for Ubuntu ( ). So you can (and should) install it, but it is no longer default nor officially supported.

But I would also like to note that they attached the log files, which are not Wine. Trying the Windows version to see if it works is a valid attempt in my book.

The problem itself seems to be with an import statement inside a library, these usually are handled before persistent variables - welp, given the evil import was within discord_rpc package, it probably doesn't even have access to persistent variables. It is very rare to add "if persistent: import".

So for reference and learning, imported libraries usually do not have access to the persistent (or even the multi-persistent) files, at least not during import time.

Also for reference, Ren'Py does not have Python 3. You cannot run both Python versions at once. What Ren'Py added is an optional compatibility mode which tries to mimic Python 3 rules and defaults, so you can prepare your game for Ren'Py 8.
A bit similar to how __future__ does it, I think?

Ren'Py 8 will be the first version to officially have Python 3 support, and Python 3 support only (however we're not sure which version; I'm hoping for something prior to 3.10 because Python 3.10 will make the transition even harder).

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.
 
  • Like
Reactions: JohnF95zone

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
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).
Can't say much about it since I upgrade to Ubuntu Focal from Xenial.
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.
I tried the game myself and had no issue with it, that's why I suggest a fresh attempt before launching the game.
 

Mitsuna

Active Member
Jun 21, 2019
533
700
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.

It's more complicated than 2 vs 3, and personally I believe you should stick with 3.9 for system (you probably don't need anything else system-wide, most likely you don't want 2 unless you have some seriously obsolete legacy software without its own runtime).

I don't have any problems with that game (absolutely none), but it doesn't have internet access (why would you ever give it to random smut games anyway lol check the amount of data they all leak). I can assure you that linux is entirely ready for gaming (since dxvk came to existence). For renpy "it just works" and I've had more struggling with renpy novels on steam (for example some don't have sound and you need files from the real runtime).

Btw WINE is fine too, you can use the same saves even.
 
Last edited:

JohnF95zone

Engaged Member
Oct 31, 2017
2,016
3,516
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.
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
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.
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.

So far we knew that discord integration might be the reason for the crash on your system, but we don't know why, since the crash only happens for you and not for us. There could be many different reasons for that:
- broken saves
- mixed versions (compressed and non-compressed)
- using outdated Mods etc

In my previous posts I suggest to delete (backup) the game's hidden folder in your home directory to see if the game continues to crash. (Pazkero gave a good explanation why the crash isn't related to the persistent files, but it is still worth to try it - then we can scratch it off the list.)
 
Last edited:
  • Like
Reactions: JohnF95zone

Thermophob

Well-Known Member
Apr 10, 2018
1,925
2,616
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.
 
May 1, 2020
6
2
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!
 
  • Like
Reactions: nerogaf

nerogaf

Active Member
Aug 23, 2019
519
368
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!
I understand Your current state.
File "Slash13.ogg" should be renamed to "slash13.ogg".
Linux distributions are case-sensitive.
 
Last edited:

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
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.

Edit: It should be named the same as shown in the error message.
 
  • Like
Reactions: nerogaf
5.00 star(s) 3 Votes