Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins: should be able to load in datastacks, json, logfiles #1700

Open
dcdenu4 opened this issue Nov 26, 2024 · 2 comments
Open

Plugins: should be able to load in datastacks, json, logfiles #1700

dcdenu4 opened this issue Nov 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dcdenu4
Copy link
Member

dcdenu4 commented Nov 26, 2024

Currently this is failing because InVEST looks for an invest-like model in it's given environment space (see models.py line 27). But, the plugin is installed in the natcap namespace in it's isolated mamba env.

I feel like this was partly redesigned specifically for plugins, but the separate environment issue seems to be a big hurdle to this being generalizable.

The specific error I see when trying is:

  File "C:\Users\ddenu\Workspace\Repositories\venvs\schisto\Lib\site-packages\natcap\invest\ui_server.py", line 168, in post_datastack_file
    model_id = PYNAME_TO_MODEL_ID_MAP[stack_info.model_name]
               ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'natcap.invest.schistosomiasis'
@davemfish davemfish added the bug Something isn't working label Nov 26, 2024
@davemfish davemfish added this to the plugins milestone Nov 26, 2024
@dcdenu4 dcdenu4 self-assigned this Nov 26, 2024
@dcdenu4
Copy link
Member Author

dcdenu4 commented Nov 26, 2024

It looks like the thing missing is for the server_requests.fetchDatastackFromFile call to get the port associated with the model instead of using getCorePort.

@emlys
Copy link
Member

emlys commented Dec 9, 2024

Yes, I think server_requests.fetchDatastackFromFile should call the plugin server, then this should work without changes to invest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants