neumond / python-computer-craft

Pythonization of ComputerCraft Minecraft mod. Write Python instead Lua!
MIT License
69 stars 7 forks source link

Cannot execute "py" after using wget http:127.0.0.1:8080/ py #3

Closed Ross015 closed 10 months ago

Ross015 commented 3 years ago

Whenever I try to run "py" I get the following error: py:36: attempt to call field 'unserializeJSON' (a nil value)

neumond commented 3 years ago

For some reason there's no unserializeJSON in textutils. I got rid of JSONs in newer versions anyway, need to make a release..

Bmorr1123 commented 3 years ago

Any update on a new release @neumond ? I'm having the same issue.

neumond commented 3 years ago

Hmm.. Just realized you're probably still running original ComputerCraft. It doesn't have unserializeJSON method. I could recommend switching to ComputerCraft:Tweaked, which is polished, optimized and updated version of original ComputerCraft. But I realize that this advice may lead to breaking existing carefully prepared modpacks. To support original ComputerCraft I need to adjust old way of communication with server as well, via HTTP long polling instead websockets.

I'll spend some time on this today, but can't promise it will be finished soon. Any help is appreciated.

Bmorr1123 commented 3 years ago

I am using CC: Tweaked within the FTB Revelations modpack. As far as I know there's nothing changed changed from the original CC: Tweaked mod.

neumond commented 3 years ago

I've inspected modpack contents, it contains quite old version cc-tweaked-1.12.2-1.84.0.jar, which expectedly doesn't have unserializeJSON. Even if I fix the issue with JSON serialization, I can't guarantee everything will work, but I'll try to test the package against this specific set of versions. By the way, how do you install pycomputercraft, using docker or pip?

Bmorr1123 commented 3 years ago

I used pip but I also tried Docker afterwards just in case. I have now uninstalled Docker because I don't want to run the web server 24/7.

neumond commented 10 months ago

Current main uses custom serialization format. Although I haven't tested everything on older minecraft && CC yet, there must be no issue with unserializeJSON anymore.