Skip to content

[BUG]: 4.1.4 -> 4.2.0 could not migrate config #240

Open
@willmorrison1

Description

@willmorrison1

Descriptions

I have a system with pyra 4.1.4 installed and now try to upgate to 4.2.0. At this stage of the install I have the following:

Installed code dependencies
Please install the UI using the installer that opens now
Running command "msiexec /i C:\Users\fitlet2\Documents\pyra\ui-installers\Pyra.UI_4.2.0_x64_en-US.msi /qf" in directory "C:\Users\Public\Documents\pyra-setup-tool"
Installed the UI
Updated the link in pyra-cli.bat
Running command "echo %PATH%" in directory "C:\Users\Public\Documents\pyra-setup-tool"
Make the "pyra-cli" command available, by adding "C:\Users\fitlet2\Documents\pyra" to your "user environment variables". See the pyra setup docs. (ok)
Created desktop shortcut to code directory
Should we reuse the config.json from a previously installed version? (no | 4.1.4) 4.1.4
Could not migrate config. The config of version "4.1.4" might be invalid: Could not perform config migration 4.1.4 -> 4.2.0: TypeError("'NoneType' object is not a mapping")
Exception occured!
Traceback (most recent call last):
  File "C:\Users\Public\Documents\pyra-setup-tool\run.py", line 5, in <module>
    main.run()
  File "C:\Users\Public\Documents\pyra-setup-tool\src\main.py", line 120, in run
    raise e
  File "C:\Users\Public\Documents\pyra-setup-tool\src\main.py", line 98, in run
    commands.install.run(prerelease=False)
  File "C:\Users\Public\Documents\pyra-setup-tool\src\commands\install.py", line 48, in run
    tasks.migrate_config.migrate_config(available_versions_to_migrate_from, version_to_be_installed)
  File "C:\Users\Public\Documents\pyra-setup-tool\src\tasks\migrate_config.py", line 27, in migrate_config
    _migrate_config_files(version_to_migrate_from, version)
  File "C:\Users\Public\Documents\pyra-setup-tool\src\tasks\migrate_config.py", line 53, in _migrate_config_files
    json.dump(new_config, f)
UnboundLocalError: local variable 'new_config' referenced before assignment
PS C:\Users\Public\Documents\pyra-setup-tool>

the above upgrade feature doesn't seem to have worked. The 4.2.0 pyra instance then loads and there is no config file and a range of errors

Image

no config

Image

Pyra Version

4.1.4 upgrading to 4.2.0

OPUS Version

No response

CamTracker Version

No response

Windows Version

No response

Your config.json file

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions