[SOLVED] Python Doesn't Work (StringIO.pyc)

This forum is currently in read-only mode.
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Uuuhh, I messed up. :/ Something happened this afternoon that rendered Python in my CC absolutely useless. Nothing works, it seems, as there's only the "An error occured in python, but construct is unable to obtain any error information without StringUO.pyc".

    I've tried feeding the DATA\Python StringIO.pyc from both Python 2.6 and Python 2.7, tried reinstalling CC but to no avail. Is there another place where StringIO.pyc persists after reinstall? I really don't know how to fix it, and this happened when I finally get going with my project (downloaded Spriter and I'm in heaven right now).

    Any, ANY advice on this would be appreciated!

    Edit: I suppose I should add that this was not a problem before, as Python worked with my CC pretty well. The error seems to be project-specific, but anyway... could somebody point me what version of Python does CCr2 use?

  • Can you try exporting your game to EXE and check all the Python libraries to see if it works fine after importing them?

  • Well, to be honest I solved it somehow, but why exactly it broke down is still a mystery for me. I depend heavily for Python in my projects, so I do most stuff with it.

    First, even a simple script like: Function.Call("my_function",0) didn't work in a new , empty project (aside for the function plugin). Then I reinstalled CC, same problem but NOT with this new, empty project. So I downloaded Python 2.6 and manually copied the StrinIO.pyc into CC Data folder. Well... that didn't help.

    But what did was deleting all other StringIO.pyc from other locations - it seems that in desperation I copied that file into the project folder and it was a 2.7 version. After deleting it, and tweaking the code - so I deleted all the in-developement parts and left only those that I knew would work - I could resume coding again.

    I posted all this for anybody in the future with the same problem. Oh, and Jayjay, I didn't try exporting the game yet. That would test something, out of curiosity?

  • Thanks for letting us know <img src="smileys/smiley1.gif" border="0" align="middle" /> and during export it should package the program with the 2.6 verions from the CC folder (providing you haven't modified them) when you checkbox the include files you want, so I was testing to see if it was a problem during runtime of your computer providing libraries of a different Python version <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem, I'm just glad I managed to fix it. And as a results of my experiments: one CAN use other Python libraries than only those provided in CC by compiling them (only 2.6 version, otherwise there will be a Magic Number error... first time seeing that I thought that some computer voodoo has gone bad) and adding into the Data folder. It's weird that somehow this 2.7 StringIO found its way into that folder in the first place...

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