Skip to content

Failing to save config at exit #64

Closed
@chrisjbillington

Description

@chrisjbillington

Getting this traceback upon exit and clicking "yes please save configuration"

Seems like if the configuration doesn't exist already it fails.

This is possibly due to changes in labconfig, but we should probably just have lyse use configparser directly instead of labconfig.

Traceback (most recent call last):
  File "/home/bilbo/venvs/labscript/lyse/lyse/__main__.py", line 200, in closeEvent
    if app.on_close_event():
  File "/home/bilbo/venvs/labscript/lyse/lyse/__main__.py", line 1981, in on_close_event
    elif not self.are_you_sure():
  File "/home/bilbo/venvs/labscript/lyse/lyse/__main__.py", line 1971, in are_you_sure
    self.save_configuration(self.last_save_config_file)
  File "/home/bilbo/venvs/labscript/lyse/lyse/__main__.py", line 2075, in save_configuration
    lyse_config.set('lyse_state', key, pprint.pformat(value))
  File "/usr/lib/python3.8/configparser.py", line 1201, in set
    super().set(section, option, value)
  File "/usr/lib/python3.8/configparser.py", line 902, in set
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'lyse_state'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions