1.1.1 can't parse options.dat from earlier versions

Issue #122 resolved
Rémi Verschelde created an issue

I just packaged 1.1.1C for Mageia (there's no C tag, but I see a C release for Windows using the current tip, so I used that as the added bugfix seemed good to have).

I get this issue on start:

$ lostsky 
Loading options!
Loaded saved options!
Traceback (most recent call last):
  File "/usr/games/lostsky", line 14, in <module>
    lostsky.bootstrap()
  File "/usr/lib/python2.7/site-packages/lostsky/__init__.py", line 81, in bootstrap
    engine = Engine(screen, tilesize, size_window)
  File "/usr/lib/python2.7/site-packages/lostsky/core/engine.py", line 251, in __init__
    self.sfx_system.update_volume(self.options.sfx_volume)
AttributeError: 'Options' object has no attribute 'sfx_volume'

Apparently my ~/.config/lostsky/options.dat from 1.1 did not have this parameter, and the parser fails instead of fixing the config file. Remove the config fixes the issue, but this should be better handled by the engine. I attach the pre-1.1.1 config file that causes the bug.

Comments (2)

  1. Rémi Verschelde reporter

    Thanks for the fast fix, it works great:

    Loading options!
    Loaded saved options!
    Music Volume Config not found. Using default = 5.
    Sound Effects Volume Config not found. Using default = 5.
    Saving Options!
    Saved Options!
    
  2. Log in to comment