I have a very simple model set up with only one sector with one technology. I seem to be getting the following error message:
'RuntimeError: Subsector with TRA_DMD_PCAR_PET_01 has no output commodities'
This error seems to be appearing when the existing capacity file has only 0 values specified for all years of the simulation or 0 in the first year and an existing capacity specified from a later year onwards. If I specify a capacity in the first year or a retirement profile, I don't get any errors. Additionally I don't see the error If I set an arbitrarily small number in the first year.
Also, I don't seem to be getting this error when I have a model set up with multiple sectors and technologies.
I am not quite sure what is causing the 'commodities' variable to be empty and have a length = 0 which leads to the error.
The full error message is:
Traceback (most recent call last):
File "/Users/sharwaridixit/anaconda3/envs/muse_env/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/sharwaridixit/anaconda3/envs/muse_env/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
cli.main()
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/Users/sharwaridixit/Documents/Transport/Transport_trial_model_cars_e10/run_muse.py", line 13, in
model = MCA.factory(settings)
File "/Users/sharwaridixit/MUSE_OS/src/muse/mca.py", line 74, in factory
sectors.append(SECTORS_REGISTERED[kind](sector, settings))
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/sector.py", line 53, in factory
subsectors = [
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/sector.py", line 54, in
Subsector.factory(
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/subsector.py", line 224, in factory
raise RuntimeError(msg)
RuntimeError: Subsector with TRA_DMD_PCAR_PET_01 has no output commodities
To Reproduce
I have attached the folder with the input files; the existing capacity file currently has a 0 capacity for all the years therefore running the model should show the error.
Transport_trial_model_cars_e10.zip
Context
Please, complete the following to better understand the system you are using to run MUSE.
Operative system (eg. Windows 10): MacOS
MUSE version (eg. 1.0.1): Version 1.1.0
Installation method (eg. pipx, pip, development mode): Virtual environment-based installation
Python version (you can get this running python --version): 3.9.19
Describe the bug
I have a very simple model set up with only one sector with one technology. I seem to be getting the following error message: 'RuntimeError: Subsector with TRA_DMD_PCAR_PET_01 has no output commodities' This error seems to be appearing when the existing capacity file has only 0 values specified for all years of the simulation or 0 in the first year and an existing capacity specified from a later year onwards. If I specify a capacity in the first year or a retirement profile, I don't get any errors. Additionally I don't see the error If I set an arbitrarily small number in the first year. Also, I don't seem to be getting this error when I have a model set up with multiple sectors and technologies.
I am not quite sure what is causing the 'commodities' variable to be empty and have a length = 0 which leads to the error.
The full error message is:
Traceback (most recent call last): File "/Users/sharwaridixit/anaconda3/envs/muse_env/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/sharwaridixit/anaconda3/envs/muse_env/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
cli.main()
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/sharwaridixit/.vscode/extensions/ms-python.debugpy-2024.0.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/Users/sharwaridixit/Documents/Transport/Transport_trial_model_cars_e10/run_muse.py", line 13, in
model = MCA.factory(settings)
File "/Users/sharwaridixit/MUSE_OS/src/muse/mca.py", line 74, in factory
sectors.append(SECTORS_REGISTERED[kind](sector, settings))
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/sector.py", line 53, in factory
subsectors = [
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/sector.py", line 54, in
Subsector.factory(
File "/Users/sharwaridixit/MUSE_OS/src/muse/sectors/subsector.py", line 224, in factory
raise RuntimeError(msg)
RuntimeError: Subsector with TRA_DMD_PCAR_PET_01 has no output commodities
To Reproduce
I have attached the folder with the input files; the existing capacity file currently has a 0 capacity for all the years therefore running the model should show the error. Transport_trial_model_cars_e10.zip
Context
Please, complete the following to better understand the system you are using to run MUSE.
python --version
): 3.9.19