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

Older save-game needs "migration" to new format #198

Closed
Quix0r opened this issue Dec 10, 2019 · 2 comments · Fixed by #199
Closed

Older save-game needs "migration" to new format #198

Quix0r opened this issue Dec 10, 2019 · 2 comments · Fixed by #199

Comments

@Quix0r
Copy link
Contributor

Quix0r commented Dec 10, 2019

When I try to load a 0.31pre game I get the following error message:

Exception in function show at Tue Jul 10 23:13:36 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 188, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:13:46 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 202, in show
    result = self.handle(event)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 329, in handle
    return self.call_handlers(handlers, event)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 341, in call_handlers
    handler(event)
  File "/home/user/git/singularity/code/graphics/button.py", line 114, in handle_event
    self.activate_with_sound(event)
  File "/home/user/git/singularity/code/graphics/button.py", line 127, in activate_with_sound
    self.activated(event)
  File "/home/user/git/singularity/code/graphics/button.py", line 169, in activated
    self.function(*self.args, **self.kwargs)
  File "/home/user/git/singularity/code/graphics/button.py", line 217, in show_dialog
    raise constants.Handled, dialog.call_dialog(self.dialog, self)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 96, in call_dialog
    retval = dialog.show()
  File "/home/user/git/singularity/code/screens/research.py", line 188, in show
    return super(ResearchScreen, self).show()
  File "/home/user/git/singularity/code/graphics/dialog.py", line 602, in show
    return super(ChoiceDialog, self).show()
  File "/home/user/git/singularity/code/graphics/dialog.py", line 199, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:14:09 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 199, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:14:13 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 199, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:14:15 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 199, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:15:33 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 188, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Tue Jul 10 23:15:35 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 202, in show
    result = self.handle(event)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 329, in handle
    return self.call_handlers(handlers, event)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 341, in call_handlers
    handler(event)
  File "/home/user/git/singularity/code/screens/map.py", line 476, in on_tick
    mins_passed = g.pl.give_time(secs)
  File "/home/user/git/singularity/code/player.py", line 428, in give_time
    g.map_screen.show_message(text)
  File "/home/user/git/singularity/code/screens/map.py", line 336, in show_message
    dialog.call_dialog(self.message_dialog, self)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 96, in call_dialog
    retval = dialog.show()
  File "/home/user/git/singularity/code/graphics/dialog.py", line 188, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 301, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 305, in update
    self.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 297, in prepare_for_redraw
    child.prepare_for_redraw()
  File "/home/user/git/singularity/code/graphics/widget.py", line 284, in prepare_for_redraw
    self.rebuild()
  File "/home/user/git/singularity/code/screens/map.py", line 634, in rebuild
    if g.pl.display_discover == "full":
AttributeError: 'Player' object has no attribute 'display_discover'

Exception in function show at Sun Nov 25 00:13:32 2018 CEST:
Traceback (most recent call last):
  File "/home/user/git/singularity/code/safety.py", line 47, in safe_call
    return func(*args, **kwargs)
  File "/home/user/git/singularity/code/graphics/dialog.py", line 188, in show
    Dialog.top.maybe_update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 362, in maybe_update
    self.update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 368, in update
    self._update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 400, in _update
    child._update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 387, in _update
    check_mask += child._update()
  File "/home/user/git/singularity/code/graphics/widget.py", line 377, in _update
    self.redraw()
  File "/home/user/git/singularity/code/graphics/text.py", line 354, in redraw
    self.print_text()
  File "/home/user/git/singularity/code/graphics/text.py", line 655, in print_text
    self.align, self.valign, self.real_size, self.wrap)
  File "/home/user/git/singularity/code/graphics/text.py", line 169, in print_string
    print_line(surface, xy, font, chunks, my_styles)
  File "/home/user/git/singularity/code/graphics/text.py", line 183, in print_line
    _do_print(surface, chunk, xy, font, color)
  File "/home/user/git/singularity/code/graphics/text.py", line 121, in _do_print
    rendered_text = font.render(text, True, color)
TypeError: Invalid foreground RGBA argument

Exception in function load_savegame at Tue Dec 10 03:20:28 2019 CEST:
Traceback (most recent call last):
  File "/opt/git/singularity/singularity/code/screens/savegame.py", line 197, in return_savegame
    sv.load_savegame(save)
  File "/opt/git/singularity/singularity/code/savegame.py", line 298, in load_savegame
    savegame.load_file(fd)
  File "/opt/git/singularity/singularity/code/savegame.py", line 547, in load_savegame_by_pickle
    new_log = [_convert_log_entry(x) for x in player_log]
  File "/opt/git/singularity/singularity/code/savegame.py", line 658, in _convert_log_entry
    reason, base_name, base_type_id, location_id = log_data
ValueError: need more than 3 values to unpack

Is it possible for you to write some "save-game migration" to have this save-game working? You can find the save-games here.

@rofl0r
Copy link

rofl0r commented Dec 10, 2019

imo it's not worth the effort. owner of old save games can simply keep playing their old version, or start a new game. adding backwards compat just adds a lot of code that's hardly ever tested.

@nthykier
Copy link
Member

nthykier commented Dec 10, 2019 via email

nthykier added a commit that referenced this issue Dec 11, 2019
Closes: #198
Signed-off-by: Niels Thykier <niels@thykier.net>
nthykier added a commit that referenced this issue Dec 11, 2019
Closes: #198
Signed-off-by: Niels Thykier <niels@thykier.net>
@nthykier nthykier mentioned this issue Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants