topological-state / stskit

python-interface and graphical tools for stellwerksim game
MIT License
4 stars 4 forks source link

AttributeError: 'NoneType' object has no attribute 'hour' #108

Closed jokey2k closed 1 year ago

jokey2k commented 1 year ago

Gerade in Lüneburg online gesehen:

C:\Users\mail\Downloads\stskit>C:\Users\mail\miniconda3\python stsdispo.py
Traceback (most recent call last):
  File "C:\Users\mail\Downloads\stskit\stskit\stsobj.py", line 37, in time_to_minutes
    return dt.hour * 60 + dt.minute + round(dt.second / 60)
AttributeError: 'NoneType' object has no attribute 'hour'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\mail\Downloads\stskit\stsdispo.py", line 4, in <module>
    main()
  File "C:\Users\mail\Downloads\stskit\stskit\__main__.py", line 336, in main
    qtrio.run(main_window)
  File "C:\Users\mail\miniconda3\lib\site-packages\qtrio\_core.py", line 513, in run
    return runner.outcomes.unwrap()
  File "C:\Users\mail\miniconda3\lib\site-packages\qtrio\_core.py", line 472, in unwrap
    result = self.trio.unwrap()
  File "C:\Users\mail\miniconda3\lib\site-packages\outcome\_impl.py", line 138, in unwrap
    raise captured_error
  File "C:\Users\mail\miniconda3\lib\site-packages\qtrio\_core.py", line 720, in trio_main
    result = await async_fn(*args)
  File "C:\Users\mail\Downloads\stskit\stskit\__main__.py", line 318, in main_window
    async with trio.open_nursery() as nursery:
  File "C:\Users\mail\miniconda3\lib\site-packages\trio\_core\_run.py", line 815, in __aexit__
    raise combined_error_from_nursery
  File "C:\Users\mail\Downloads\stskit\stskit\__main__.py", line 275, in ereignis_loop
    await self.zentrale.ereignis(ereignis)
  File "C:\Users\mail\Downloads\stskit\stskit\zentrale.py", line 150, in ereignis
    self.planung.ereignis_uebernehmen(ereignis)
  File "C:\Users\mail\Downloads\stskit\stskit\planung.py", line 1935, in ereignis_uebernehmen
    altes_ziel.verspaetung_an = time_to_minutes(ereignis.zeit) - time_to_minutes(altes_ziel.an)
  File "C:\Users\mail\Downloads\stskit\stskit\stsobj.py", line 40, in time_to_minutes
    return round(dt.seconds / 60)
AttributeError: 'NoneType' object has no attribute 'seconds'

C:\Users\mail\Downloads\stskit>