Debug mode VSCode Internal Error: Unauthorized

Hi,

When parsing GEF files (CPT’s), Scia XML’s, Excel files when the debug mode is used to start Viktor an error is raised viktor.errors.InternalError: Unauthorized.
When the same functions are run with Viktor, but started with the viktor-cli start command, it works completely fine. So it seems that this is a bug for the Debug mode (at least for Visual Studio Code).
Here below I pasted the error for the GEF File and the Scia XML.
I hope you can you us with this. Running the code in the Debug mode is way more effective for me and my colleagues.

The example error from the Scia XML:
Exception: Input file could not be generated, please check your model
2022-11-14 08:18:42.984 INFO : Job (uid: 47928) received - EntityType: Tank - call: view_scia_analysis_reactions
2022-11-14 08:18:42.994 INFO : Progress message sent:
| Creating SCIA model
2022-11-14 08:18:43.435 ERROR : Exception is raised
Traceback (most recent call last):
File “viktor\external\scia\scia.pyx”, line 1962, in viktor.external.scia.scia.Model.generate_xml_input
File “viktor\core.pyx”, line 1469, in viktor.core._post_on_addon_endpoint
viktor.errors.InternalError: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “viktor_connector\connector.pyx”, line 314, in connector.Job.execute
File “viktor\core.pyx”, line 1839, in viktor.core._handle_job
File “viktor\core.pyx”, line 1826, in viktor.core._handle_job._handle_view
File “viktor\views.pyx”, line 2021, in viktor.views.View._wrapper
File “C:\DevOps\Python.ParametricDesign\RWZITank\app\tank\controller.py”, line 123, in view_scia_analysis_reactions
_, scia_output_xml_file = scia_controller.get_results(params)
File “C:\DevOps\Python.ParametricDesign\RWZITank\app\tank\program_repository\scia_engineer_controller.py”, line 672, in get_results
input_xml, input_def = self.create_input_file(model)
File “C:\DevOps\Python.ParametricDesign\RWZITank\app\tank\program_repository\scia_engineer_controller.py”, line 616, in create_input_file
input_xml, input_def = model.generate_xml_input(as_file=True)
File “viktor\external\scia\scia.pyx”, line 1964, in viktor.external.scia.scia.Model.generate_xml_input
Exception: Input file could not be generated, please check your model

Example error from GEF File:
viktor.errors.InternalError: Unauthorized
2022-11-14 08:11:19.140 INFO : Job (uid: 47914) received - EntityType: GEFFile - call: process_file
2022-11-14 08:11:19.724 ERROR : Exception is raised
Traceback (most recent call last):
File “viktor_connector\connector.pyx”, line 314, in connector.Job.execute
File “viktor\core.pyx”, line 1835, in viktor.core._handle_job
File “viktor\core.pyx”, line 1822, in viktor.core._handle_job._handle_params_from_file
File “viktor\core.pyx”, line 265, in viktor.core.ParamsFromFile._wrapper
File “C:\DevOps\Python.ParametricDesign\RWZITank\app\gef_file\controller.py”, line 41, in process_fi
gef_data = gef_file.parse([“corrected_depth”, “fs”, “u2”])
File “viktor\geo.pyx”, line 883, in viktor.geo.GEFFile.parse
File “viktor\core.pyx”, line 1469, in viktor.core._post_on_addon_endpoint
viktor.errors.InternalError: Unauthorized
File “viktor_connector\connector.pyx”, line 314, in connector.Job.execute
File “viktor\core.pyx”, line 1835, in viktor.core._handle_job
File “viktor\core.pyx”, line 1822, in viktor.core._handle_job._handle_params_from_file
File “viktor\core.pyx”, line 265, in viktor.core.ParamsFromFile._wrapper
File “C:\DevOps\Python.ParametricDesign\RWZITank\app\gef_file\controller.py”, line 41, in process_file
gef_data = gef_file.parse([“corrected_depth”, “fs”, “u2”])
File “viktor\geo.pyx”, line 883, in viktor.geo.GEFFile.parse
File “viktor\core.pyx”, line 1469, in viktor.core._post_on_addon_endpoint
viktor.errors.InternalError: Unauthorized

Hi Sjoerd,

We have released a new connector (v5.18.1) which should resolve the issue. Could you please reinstall the app and try again?

viktor-cli install

Hi Kevin,

Thanks! The new connector does solve the problem!