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

For questions about using Classic.

Post » Fri Jul 12, 2013 8:00 pm

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?bitworks2013-07-15 10:14:25
B
4
S
1
Posts: 28
Reputation: 435

Post » Fri Jul 12, 2013 11:51 pm

Can you try exporting your game to EXE and check all the Python libraries to see if it works fine after importing them?
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Mon Jul 15, 2013 10:13 am

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?
B
4
S
1
Posts: 28
Reputation: 435

Post » Mon Jul 15, 2013 4:04 pm

Thanks for letting us know 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
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Tue Jul 23, 2013 9:37 am

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...
B
4
S
1
Posts: 28
Reputation: 435


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests