{"action":"created","issue":{"url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/2086","labels_url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/2086/labels{/name}","comments_url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/2086/comments","events_url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/2086/events","html_url":"https://github.com/unknown-horizons/unknown-horizons/issues/2086","id":13148073,"number":2086,"title":"Error with auto-upgrading pretty old savegame to rev 50: stance","user":{"login":"ChrisOelmueller","id":373440,"avatar_url":"https://avatars.githubusercontent.com/u/373440?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisOelmueller","html_url":"https://github.com/ChrisOelmueller","followers_url":"https://api.github.com/users/ChrisOelmueller/followers","following_url":"https://api.github.com/users/ChrisOelmueller/following{/other_user}","gists_url":"https://api.github.com/users/ChrisOelmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisOelmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisOelmueller/subscriptions","organizations_url":"https://api.github.com/users/ChrisOelmueller/orgs","repos_url":"https://api.github.com/users/ChrisOelmueller/repos","events_url":"https://api.github.com/users/ChrisOelmueller/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisOelmueller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"stubb","id":373318,"avatar_url":"https://avatars.githubusercontent.com/u/373318?v=3","gravatar_id":"","url":"https://api.github.com/users/stubb","html_url":"https://github.com/stubb","followers_url":"https://api.github.com/users/stubb/followers","following_url":"https://api.github.com/users/stubb/following{/other_user}","gists_url":"https://api.github.com/users/stubb/gists{/gist_id}","starred_url":"https://api.github.com/users/stubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubb/subscriptions","organizations_url":"https://api.github.com/users/stubb/orgs","repos_url":"https://api.github.com/users/stubb/repos","events_url":"https://api.github.com/users/stubb/events{/privacy}","received_events_url":"https://api.github.com/users/stubb/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/milestones/20","labels_url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/milestones/20/labels","id":452041,"number":20,"title":"2015.1","description":"","creator":{"login":"ChrisOelmueller","id":373440,"avatar_url":"https://avatars.githubusercontent.com/u/373440?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisOelmueller","html_url":"https://github.com/ChrisOelmueller","followers_url":"https://api.github.com/users/ChrisOelmueller/followers","following_url":"https://api.github.com/users/ChrisOelmueller/following{/other_user}","gists_url":"https://api.github.com/users/ChrisOelmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisOelmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisOelmueller/subscriptions","organizations_url":"https://api.github.com/users/ChrisOelmueller/orgs","repos_url":"https://api.github.com/users/ChrisOelmueller/repos","events_url":"https://api.github.com/users/ChrisOelmueller/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisOelmueller/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":6,"state":"open","created_at":"2013-10-10T18:57:17Z","updated_at":"2015-02-05T10:30:08Z","due_on":"2015-05-31T22:00:00Z","closed_at":null},"comments":3,"created_at":"2013-04-13T03:43:40Z","updated_at":"2015-02-05T10:59:42Z","closed_at":null,"body":"* Store this savegame in `.unknown-horizons/save/`: **Attachment**: [loading_problem.sqlite](http://up.unknown-horizons.org/f/?id=187&n=loading_problem.sqlite)\r\n* Try to load it\r\n\r\n```pytb\r\nFailed to load /home/eoc/.unknown-horizons/save/loading_problem.sqlite\r\nTraceback (most recent call last):\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/main.py\", line 325, in start_singleplayer\r\n    _modules.session.load(options)\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/spsession.py\", line 43, in load\r\n    super(SPSession, self).load(*args, **kwargs)\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/session.py\", line 230, in load\r\n    savegame_db = SavegameAccessor(options.game_identifier, options.is_map, options) # Initialize new dbreader\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/util/savegameaccessor.py\", line 61, in __init__\r\n    game_identifier = self.upgrader.get_path()\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/util/savegameupgrader.py\", line 408, in get_path\r\n    self._upgrade()\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/util/savegameupgrader.py\", line 349, in _upgrade\r\n    self._upgrade_to_rev50(db)\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/util/savegameupgrader.py\", line 50, in _upgrade_to_rev50\r\n    db('UPDATE stance set stance = \"hold_ground_stance\" where stance = \"hold_ground\"')\r\n  File \"/home/eoc/UH/unknown-horizons/horizons/util/dbreader.py\", line 48, in __call__\r\n    self.cur.execute(command, args)\r\nOperationalError: no such table: stance\r\n```\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/1206242-error-with-auto-upgrading-pretty-old-savegame-to-rev-50-stance?utm_campaign=plugin&utm_content=tracker%2F287396&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F287396&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/comments/73028836","html_url":"https://github.com/unknown-horizons/unknown-horizons/issues/2086#issuecomment-73028836","issue_url":"https://api.github.com/repos/unknown-horizons/unknown-horizons/issues/2086","id":73028836,"user":{"login":"ChrisOelmueller","id":373440,"avatar_url":"https://avatars.githubusercontent.com/u/373440?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisOelmueller","html_url":"https://github.com/ChrisOelmueller","followers_url":"https://api.github.com/users/ChrisOelmueller/followers","following_url":"https://api.github.com/users/ChrisOelmueller/following{/other_user}","gists_url":"https://api.github.com/users/ChrisOelmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisOelmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisOelmueller/subscriptions","organizations_url":"https://api.github.com/users/ChrisOelmueller/orgs","repos_url":"https://api.github.com/users/ChrisOelmueller/repos","events_url":"https://api.github.com/users/ChrisOelmueller/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisOelmueller/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T10:59:42Z","updated_at":"2015-02-05T10:59:42Z","body":"I'd be fine with simply refusing to load savegames past a certain revision as long as that's handled gracefully. Definitely better than a crash.\r\nAs you can see from the traceback though, the problem seems to be in savegame-upgrader code itself, which is a bit more hairy, at least in terms of fixing the crash (need to check that the upgrade code still works correctly for other saves).\r\n\r\nDo we have some details on which changes / releases broke approximately which savegame versions? Without this data, would you just place arbitrary cutoff points somewhere? Perhaps checking which savegame versions were produced by each release (and maintaining that list in the future) could be good, this is not the first time I'd have liked a table like this, and it seems simple enough to look up."}}