Tutorial: Online Multiplayer with PodSixNet

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Ok, so it is probably not a bug in Construct's Python implementation. If the exe's don't work (which I properly included StringIO and everything else) then it is a problem with your computer system's config.

    You should never have to copy and paste StringIO.pyc or any other PYC into the directory.. that is why they are checked when building the executable. It sounds like you have Tulamide's exact problem.

    If we can get enough people trying this out and getting the same error maybe we can troubleshoot what the problem is. To my knowledge only you and Tulamide have had this problem... so it is so rare we can't figure out what is wrong. It is some type of path problem where it isn't finding the Python library properly (since it worked when you ran it within Construct).

  • This is very strange. I uninstalled python and all the python addons i had. Still the same error. It seems to be looking in the wrong place for these libs... It works fine on my laptop (which never had python installed).

    Maybe there is some python reference lurking in the registry?

    EDIT - I made a game that was just "Sprite.X += 1" and it works when i preview in construct, but doesn't work when exported. I get the same error (regarding StringIO). what is happening to my life?

    EDIT2 - Simple python program above works if i put it in the construct/data/python folder and put the python26.dll there too. However, the podsixnet stuff still doesn't work if i put it there.

    EDIT3 - Put the simple python program in the Doc & Setting/Alee/Application Data/Scirra folder. Doesn't work still - however the Temp.exe file DOES WORK. They should be the exact same file surely?! But they are different sizes (Temp.exe is 709KB, pythontest.exe is 905KB) What is going on...

  • This is very strange. I uninstalled python and all the python addons i had. Still the same error. It seems to be looking in the wrong place for these libs... It works fine on my laptop (which never had python installed).

    Maybe there is some python reference lurking in the registry?

    EDIT - I made a game that was just "Sprite.X += 1" and it works when i preview in construct, but doesn't work when exported. I get the same error (regarding StringIO). what is happening to my life?

    EDIT2 - Simple python program above works if i put it in the construct/data/python folder and put the python26.dll there too. However, the podsixnet stuff still doesn't work if i put it there.

    EDIT3 - Put the simple python program in the Doc & Setting/Alee/Application Data/Scirra folder. Doesn't work still - however the Temp.exe file DOES WORK. They should be the exact same file surely?! But they are different sizes (Temp.exe is 709KB, pythontest.exe is 905KB) What is going on...

    That's exactly, and I really mean exactly, what happens to me too.

    When selecting the .pyc modules, are they meant to be stored in the exe? When I export to exe, neither is the .dll copied to the folder (although Construct says so) nor are there any .pyc files.

  • When selecting the .pyc modules, are they meant to be stored in the exe?

    Yes, every .pyc module you select are stored in the exe. That message about the python26.dll being copied is wrong... I've asked for months for it to be fixed.. maybe someday the devs will.

    This a very weird problem. We need more examples of what works and doesn't work to nail it down. I just tried .99.92 and built up the chat client/server and they run fine on my laptop with Python 2.5 on it.

    Do you by chance have values stored in your PATH or PYTHONPATH that could be causing this? Usually you do not need to have a PYTHONPATH variable.

    Have you tried unziping the distributables.zip in the same directory? Although, that doesn't help with the stringio error.

  • Yes, every .pyc module you select are stored in the exe. That message about the python26.dll being copied is wrong... I've asked for months for it to be fixed.. maybe someday the devs will.

    This a very weird problem. We need more examples of what works and doesn't work to nail it down. I just tried .99.92 and built up the chat client/server and they run fine on my laptop with Python 2.5 on it.

    Do you by chance have values stored in your PATH or PYTHONPATH that could be causing this? Usually you do not need to have a PYTHONPATH variable.

    Have you tried unziping the distributables.zip in the same directory? Although, that doesn't help with the stringio error.

    I think that at least for alee and myself the issue might simply be that either no .pyc are stored in the exe or somehow they get ignored. An example why I think so:

    1) I export to exe

    2) I create a folder in a randomly chosen place

    3) I move the exe to this folder and copy the python dll to it

    If I start the exe at this moment all I get is an error, saying something was going wrong but without stringsIO it can't tell me what. But exactly that (stringsIO mising) is what was going wrong! Because, if I do

    4) I copy stringsIO to this folder

    it immediatly works without any error message!

    Currently there is no python install apart from the dll that is installed with Construct. I don't have a PYTHONPATH environment and PATH holds no paths that are related to python.

    Crazy...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There has to be something on our computers making it ignore the modules contained in the exe and look somewhere else? Because the exact same .exe file works on my laptop that doesn't have python installed on it...

  • There has to be something on our computers making it ignore the modules contained in the exe and look somewhere else? Because the exact same .exe file works on my laptop that doesn't have python installed on it...

    Yes, and that's what I don't understand. You have a python installation, I used to have one, then uninstalled it. It's like there's something still there that prevents python to look into the app-stored pyc. But that doesn't seem to make much sense...

  • Does this file exist?: "C:\Program Files\Scirra\Construct\Data\Python\StringIO.pyc"

    If it doesn't, your exported exe will complain about no StringIO.pyc.

    The python module search paths are in the list "sys.path".

    I added an editbox and ran this script at the start of the layout:

    for x in sys.path:
    	EditBox.AppendText(x + '\n')[/code:2yv3ty5w]
    
    I ran that on one of my computers without python installed and a standard install of construct 0.99.92.
    
    When I previewed the module search paths were:
    [code:2yv3ty5w]C:\Documents and Settings\User\Application Data\Scirra\python26.zip
    .\DLLs
    .\lib
    .\lib\plat-win
    .\lib\lib-tk
    C:\Documents and Settings\User\Application Data\Scirra
    C:\Program Files\Scirra\Construct\Data\PythonC:\Program Files\Scirra\Construct\Data\Python.zip[/code:2yv3ty5w]
    
    and when I exported to the "C:\tmp" directory these were the module search paths:
    [code:2yv3ty5w]C:\tmp\python26.zip
    .\DLLs
    .\lib
    .\lib\plat-win
    .\lib\lib-tk
    C:\tmp
    C:\Documents and Settings\User\Local Settings\Temp\capA4.tmp\PythonC:\Documents and Settings\User\Local Settings\Temp\capA4.tmp\PythonLibs.zip
    [/code:2yv3ty5w]
    
    that PythonLibs.zip contains all the exported pyc files.
  • Thanks a lot ROJOhound! I think we're coming closer to the issue.

    Does this file exist?: "C:\Program Files\Scirra\Construct\Data\Python\StringIO.pyc"

    If it doesn't, your exported exe will complain about no StringIO.pyc.

    Yes it does.

    I've run the very same script and this is what I got from preview:

    D:\Dokumente und Einstellungen\tulamide\Anwendungsdaten\Scirra\python26.zip
    .\DLLs
    .\lib
    .\lib\plat-win
    .\lib\lib-tk
    D:\Dokumente und Einstellungen\tulamide\Anwendungsdaten\Scirra
    D:\Programme\Scirra\Construct-92\Data\PythonD:\Programme\Scirra\Construct-92\Data\Python.zip[/code:p4b9i29b]
    
    And now the important part. After exporting and manually adding StringIO.pyc to the directory, I got this (look at the last line):
    [code:p4b9i29b]D:\Dokumente und Einstellungen\tulamide\Eigene Dateien\Construct\AI Example\python26.zip
    .\DLLs
    .\lib
    .\lib\plat-win
    .\lib\lib-tk
    D:\Dokumente und Einstellungen\tulamide\Eigene Dateien\Construct\AI Example
    D:\Dokumente und Einstellungen\tulamide\Lokale Einstellungen\Temp\cap342.tmp\PythonD:\Dokumente und Einstellungen	ulamide\Lokale Einstellungen\Temp\cap342.tmp\PythonLibs.zip[/code:p4b9i29b]
    What you can see here is that "\t" is replaced by a tabulator. But only in this last line and only once. There is no valid path to the PythonLibs.zip
    
    It doesn't matter where I export it to, of course. The path will always be the local user settings (so as long as I'm "tulamide" as user the error will occur):
    [code:p4b9i29b]C:\Tmp\python26.zip
    .\DLLs
    .\lib
    .\lib\plat-win
    .\lib\lib-tk
    C:\Tmp
    D:\Dokumente und Einstellungen\tulamide\Lokale Einstellungen\Temp\cap345.tmp\PythonD:\Dokumente und Einstellungen	ulamide\Lokale Einstellungen\Temp\cap345.tmp\PythonLibs.zip[/code:p4b9i29b]
    What I don't know is: Are we talking of a python issue or a Construct issue?
  • The exact same thing happens with me Tulamide. Can ash tell us whats been corrupted here perhaps? Because its not the .exe (or the way our construct exports it) as i can't run scidave's online dungeon demo on this computer - but it works from my laptop...

    gah

  • It's a Construct issue. That would explain why it's not working for alee either since "\a" is also translated into a single character. I found the problem and the fix in "Runtime\system.cpp" line 5040, the line was commented out.

  • It's a Construct issue. That would explain why it's not working for alee either since "\a" is also translated into a single character. I found the problem and the fix in "Runtime\system.cpp" line 5040, the line was commented out.

    That's good news! Does it mean also, we just have to wait for the next release to be able to work with it? Or do we need to submit to the bug tracker? (I apologize if this is a stupid question, I'm uncertain )

    Anyway, thank you for the help and the quick finding

  • Yea it should be in the next release.

  • but why would construct break a standalone .exe file that i didn't compile? :S Or was the .exe broken but for some reason works on other people's computers but not Tulamide's and mine?

  • It's because of how python reads strings. The character combinations "\t" and "\a" are converted to some special character. This paths are messed up because of this when those combinations are in the path.

    So instead of this correct path:

    C:\Documents and Settings\alee\Local Settings\Temp\capA4.tmp\PythonLibs.zip

    python reads it as this incorrect path (the "\a" is replaced by a non visible character):

    C:\Documents and Settingslee\Local Settings\Temp\capA4.tmp\PythonLibs.zip

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)