Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issue, probably after a python2.7 update #41

Closed
Salamandar opened this issue Oct 6, 2015 · 14 comments
Closed

Some issue, probably after a python2.7 update #41

Salamandar opened this issue Oct 6, 2015 · 14 comments

Comments

@Salamandar
Copy link
Contributor

Probably after a Python update, i cannot start Fofix (3.121) nor Fofix-git (v4.0.0alpha2.r244.gd21b0cc-1)

Traceback (most recent call last):
  File "./FoFiX.py", line 276, in <module>
    main()
  File "./FoFiX.py", line 175, in main
    engine = GameEngine(config)
  File "/opt/fofix/src/GameEngine.py", line 597, in __init__
    self.data = Data(self.resource, self.svg)
  File "/opt/fofix/src/Data.py", line 130, in __init__
    self.loadImgDrawing(self, "star1",   os.path.join("themes",themename,"star1.png"), textureSize = (128, 128))
  File "/opt/fofix/src/Data.py", line 583, in loadImgDrawing
    drawing  = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
  File "/opt/fofix/src/Resource.py", line 246, in load
    return l.finish()
  File "/opt/fofix/src/Resource.py", line 113, in load
    self.result = self.function()
  File "/opt/fofix/src/Data.py", line 583, in <lambda>
    drawing  = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
  File "/opt/fofix/src/Svg.py", line 516, in __init__
    self.texture = Texture(ImgData)
  File "/opt/fofix/src/Texture.py", line 66, in __init__
    self.loadFile(name)
  File "/opt/fofix/src/Texture.py", line 70, in loadFile
    self.loadImage(Image.open(name))
  File "/opt/fofix/src/Texture.py", line 77, in loadImage
    string = image.tostring('raw', 'RGBA', 0, -1)
  File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 686, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.
@Salamandar
Copy link
Contributor Author

By the way I had a lot going on with my school, so I couldn't think about FoF.
But now I will (may)be able to spend some time on the music-game. I did a small GTKmm project, so I can say I can code C++ now (better than 2 months ago ^^).

@astrograzl
Copy link

The last sentence in error message is the solution to. I replaced tostring() with tobytes() in loadImage() method in Texture.py and it is working again. Maybe replace it on other places could be necessary. Take a look here https://bitbucket.org/janak/fofix/commits/da882aa87f3598c4db90114e16e803fd3c9df372.
IMHO it is result of Pillow package update.

@mdsitton
Copy link
Member

mdsitton commented Oct 6, 2015

I agree, that it is probably a pillow issue. I'm currently on my mackbook pro though, and am still fixing stuff after the upgrade to el capitan. So cant test it atm, I will after i get home from work though.

@Salamandar
Copy link
Contributor Author

Yes that's what I thought. I could probably do it locally but that's better to tell you 😉

BTW I cannot build fofix-git on Linux anymore, I will make an issue about this.

@mdsitton
Copy link
Member

mdsitton commented Oct 6, 2015

Its because i changed things quite a bit

I moved a decent amount of code out of the fofix repo (planning to move more) and into this repo, which is now a package that fofix depends on.
https://github.com/fofix/fretwork

Here soon i'm also going to be moving the fretsonfire update fork I started to using that repository as well. The reason for this was to have less duplication of effort between the two projects.

fretsonfire fork: https://github.com/fofix/fof-reborn

@mdsitton
Copy link
Member

mdsitton commented Oct 6, 2015

The engine side of FoFiX has fairly stable over the years with just a few differences between FoFiX and fretsonfire.

The main reason there arn't too many differences between this code, is that during the old "mod" days, a large portion of the code was always distributed as python bytecode. As far as I can tell from after rf-mod through mfh-alarian 2.7ish (havent checked after this) they never actually re-packaged the game. They just modified a subset of the source code and that was just placed back into the library.zip, along with the new data files for the mod.

@Salamandar
Copy link
Contributor Author

I don't understand why there are so many forks here. You are now working on FoF, FoFiX and FoFReborn ?
But that's not the issue here ^^
I opened another issue for the new fretwork project structure : #43

@mdsitton
Copy link
Member

Only 2, FoF-Reborn is the updated fof, it just got a name?

@Salamandar
Copy link
Contributor Author

Okay ☺
Why don't you merge FoFR and FoFiX ?
Just a question, not a critic ^^

@mdsitton
Copy link
Member

Thats what fretwork is about, sharing as much code between the two as possible. Basically I want to have a decently updated and modernized old style Frets On Fire release out by next august (10 year anniversary of Frets On Fire's release)

@araspitzu
Copy link

araspitzu commented Apr 29, 2016

Is it possible the issue still exist? After upgrading to ubuntu 16.04 (in 15.XX used work fine) i can't start FoFix anymore, the following stack trace appears:

`

Terminating due to unhandled exception:

Traceback (most recent call last):
File "FoFiX.py", line 276, in
main()
File "FoFiX.py", line 175, in main
engine = GameEngine(config)
File "/usr/share/fofix/src/GameEngine.py", line 597, in init
self.data = Data(self.resource, self.svg)
File "/usr/share/fofix/src/Data.py", line 130, in init
self.loadImgDrawing(self, "star1", os.path.join("themes",themename,"star1.png"), textureSize = (128, 128))
File "/usr/share/fofix/src/Data.py", line 583, in loadImgDrawing
drawing = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
File "/usr/share/fofix/src/Resource.py", line 246, in load
return l.finish()
File "/usr/share/fofix/src/Resource.py", line 113, in load
self.result = self.function()
File "/usr/share/fofix/src/Data.py", line 583, in
drawing = self.resource.load(target, name, lambda: ImgDrawing(self.svg, fileName), synch = True)
File "/usr/share/fofix/src/Svg.py", line 516, in init
self.texture = Texture(ImgData)
File "/usr/share/fofix/src/Texture.py", line 66, in init
self.loadFile(name)
File "/usr/share/fofix/src/Texture.py", line 70, in loadFile
self.loadImage(Image.open(name))
File "/usr/share/fofix/src/Texture.py", line 77, in loadImage
string = image.tostring('raw', 'RGBA', 0, -1)
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
"Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

`

@mdsitton
Copy link
Member

Have you updated your local copy of the repo?

@araspitzu
Copy link

It actually is a binary from the ubuntu repo (now using 16.04) i hope the maintainers will update it :D otherwise i will try running it from the local repo

@mdsitton
Copy link
Member

mdsitton commented May 4, 2016

That makes sense it's probably 3.121, I eventually plan to make a new release that fixes some of these problems with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants