eliasdoehne / stellaris-dashboard

A graph dashboard and event log for Stellaris.
123 stars 14 forks source link

ValueError: not enough values to unpack (expected 2, got 1) #7

Closed foopex closed 6 years ago

foopex commented 6 years ago
2018-05-27 10:14:14,034 - werkzeug - INFO -  * Running on http://127.0.0.1:28053/ (Press CTRL+C to quit)
2018-05-27 10:19:48,832 - root - INFO - Parsing Save File C:\Users\Username\Documents\Paradox Interactive\Stellaris\save games\quenticitizencoalition_-398431368\autosave_2252.01.01.sav...
Parsed save file C:\Users\Username\Documents\Paradox Interactive\Stellaris\save games\quenticitizencoalition_-398431368\autosave_2252.01.01.sav in 27.4795024394989 seconds.
2018-05-27 10:20:16,315 - stellarisdashboard.timeline - INFO - Processing quenticitizencoalition_-398431368, 2252.01.01
2018-05-27 10:20:16,316 - stellarisdashboard.models - INFO - Creating database for game quenticitizencoalition_-398431368 in file C:\Users\Username\Documents\stellaristimeline\db\quenticitizencoalition_-398431368.db.
2018-05-27 10:20:16,896 - stellarisdashboard.timeline - INFO - Adding new game quenticitizencoalition_-398431368 to database.
2018-05-27 10:20:16,896 - stellarisdashboard.timeline - INFO - quenticitizencoalition_-398431368 2252.01.01: Extracting galaxy data...
2018-05-27 10:20:20,386 - stellarisdashboard.timeline - ERROR - not enough values to unpack (expected 2, got 1)
2018-05-27 10:20:20,386 - stellarisdashboard.timeline - INFO - quenticitizencoalition_-398431368 2252.01.01: Resetting timeline state
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\__main__.py", line 25, in <module>
    main()
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\__main__.py", line 17, in main
    cli.f_monitor_saves(threads, polling_interval, stop_event=stop_event)
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\cli.py", line 110, in f_monitor_saves
    tle.process_gamestate(game_name, gamestate_dict)
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\timeline.py", line 87, in process_gamestate
    raise e
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\timeline.py", line 75, in process_gamestate
    self._extract_galaxy_data()
  File "c:\users\Username\desktop\stellaris-dashboard-0.1.3\src\stellarisdashboard\timeline.py", line 111, in _extract_galaxy_data
    a, b = hl
ValueError: not enough values to unpack (expected 2, got 1)
PS C:\Users\Username\Desktop\stellaris-dashboard-0.1.3>
eliasdoehne commented 6 years ago

Hi, thanks for the bug report!

I suspect the error might be related to hyperlane changes introduced in Stellaris 2.1.

I will take a look as soon as I can, but it may take a few days. Could you send me the save file of this game? That would help me isolate the issue.

foopex commented 6 years ago

2282.03.04.zip

eliasdoehne commented 6 years ago

Thanks! I reproduced the problem, and I will take a closer look in the next few days.

As a short term fix, you can remove the following lines from the file src/stellarisdashboard/timeline.py:

Line 75:

    self._extract_galaxy_data()

Lines 181 and 182:

    if config.CONFIG.extract_system_ownership:
        self._extract_system_ownership()

This way, you can still use the graphical visualizations, but unfortunately the event ledger will be broken. You will see an "Internal Server Error" when accessing the event ledger, and the related database entries might also get messed up. If you take this approach, I recommend keeping a backup of your save files so that you can generate the database from scratch once this is fixed.

foopex commented 6 years ago

Thanks, graphs work with the edit.

eliasdoehne commented 6 years ago

I fixed the problem, it was caused by some systems having hyperlanes connecting to the same system. I will make a new release soon!

eliasdoehne commented 6 years ago

Should be fixed in the current release, v0.1.4.