PlexosScenario() — zero arguments, no simulation_files — raises AttributeError: 'NoneType' object has no attribute 'get_metadata' instead of succeeding. Confirmed pre-existing on main, unrelated to #22/the tilde-path fix (that fix's new FileNotFoundError correctly does not fire here, since no input was given at all — this is a distinct code path).
Repro
from gat.scenariohandlers import PlexosScenario
PlexosScenario() # AttributeError, not a usable empty scenario
Root cause
BaseScenario.__init__ (src/gat/scenariohandlers/base.py) unconditionally computes:
self._tech_map = self.generator_technology_map
with no guard for 'no parser / no data source was ever provided.' For PlexosScenario, generator_technology_map is a @property that dereferences self.parser.get_metadata(...) — and self.parser is None whenever no solution files were given (a documented, legitimate case per the constructor's simulation_files: Optional[...] signature — e.g. 'construct now, attach data later' workflows).
Scope note
This likely affects every handler (Sienna, ReEDS, EGRET), not just Plexos — each has its own generator_technology_map implementation that may or may not tolerate a missing parser. Fixing it properly means either (a) making each handler's generator_technology_map null-safe (return {} when there's no data), or (b) having BaseScenario.__init__ skip tech-map computation when no data source is present — and auditing each subclass's 'do I have data' signal, since they may differ (self.parser, self._backend, etc.). Left unscoped here deliberately — needs its own investigation across all four handlers rather than a one-line patch.
PlexosScenario()— zero arguments, nosimulation_files— raisesAttributeError: 'NoneType' object has no attribute 'get_metadata'instead of succeeding. Confirmed pre-existing onmain, unrelated to #22/the tilde-path fix (that fix's newFileNotFoundErrorcorrectly does not fire here, since no input was given at all — this is a distinct code path).Repro
Root cause
BaseScenario.__init__(src/gat/scenariohandlers/base.py) unconditionally computes:with no guard for 'no parser / no data source was ever provided.' For
PlexosScenario,generator_technology_mapis a@propertythat dereferencesself.parser.get_metadata(...)— andself.parserisNonewhenever no solution files were given (a documented, legitimate case per the constructor'ssimulation_files: Optional[...]signature — e.g. 'construct now, attach data later' workflows).Scope note
This likely affects every handler (Sienna, ReEDS, EGRET), not just Plexos — each has its own
generator_technology_mapimplementation that may or may not tolerate a missing parser. Fixing it properly means either (a) making each handler'sgenerator_technology_mapnull-safe (return{}when there's no data), or (b) havingBaseScenario.__init__skip tech-map computation when no data source is present — and auditing each subclass's 'do I have data' signal, since they may differ (self.parser,self._backend, etc.). Left unscoped here deliberately — needs its own investigation across all four handlers rather than a one-line patch.