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

Error when running metgenc validate #126

Closed
afitzgerrell opened this issue Jan 28, 2025 · 2 comments
Closed

Error when running metgenc validate #126

afitzgerrell opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
bug Something isn't working Ops Testing Feedback from Ops testing

Comments

@afitzgerrell
Copy link
Contributor

I've installed version v1.0.1. of nsidc-metgenc. I was doing some tire kicking, and I encountered an issue running validate. So far, init and info are performant, I haven't yet tried process.

I noticed I'm now running python 3.13 whereas i used to be running 3.12.7, I'm not sure when this update happened, and I don't remember explicitly / intentionally doing anything to update python to the latest version.

Here's the error message I'm receiving:

(metgenc) cu-vpn-nsidc-172:metgenc afitzger$ metgenc validate -c ./init/test.ini -t ummg
                   __                       
   ____ ___  ___  / /_____ ____  ____  _____
  / __ `__ \/ _ \/ __/ __ `/ _ \/ __ \/ ___/
 / / / / / /  __/ /_/ /_/ /  __/ / / / /__  
/_/ /_/ /_/\___/\__/\__, /\___/_/ /_/\___/  
                   /____/                   


Validating files in output/ummg...
Traceback (most recent call last):
  File "/Users/afitzger/metgenc/bin/metgenc", line 8, in <module>
    sys.exit(cli())
             ~~~^^
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/nsidc/metgen/cli.py", line 74, in validate
    metgen.validate(configuration, content_type)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/afitzger/metgenc/lib/python3.13/site-packages/nsidc/metgen/metgen.py", line 700, in validate
    schema = json.load(_open_text(*schema_resource_location))
  File "/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/json/__init__.py", line 293, in load
    return loads(fp.read(),
                 ^^^^^^^
AttributeError: 'str' object has no attribute 'read'
@afitzgerrell afitzgerrell added bug Something isn't working Ops Testing Feedback from Ops testing labels Jan 28, 2025
@afitzgerrell
Copy link
Contributor Author

I have tested the latest version of the metgenc release from pypi (v1.0.2), and this is no longer an issue.

@lisakaser
Copy link

🎉

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

No branches or pull requests

4 participants