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 "expected str, bytes or os.PathLike object, not list" for harmony request #34

Open
hazemmahmoudnasa opened this issue Sep 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hazemmahmoudnasa
Copy link

https://harmony.uat.earthdata.nasa.gov/C1256588789-ASDC_DEV2/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&granuleId=G1269242639-ASDC_DEV2%2CG1269374306-ASDC_DEV2&variable=ztoa_net_all_mon&skipPreview=true

I just tested net2cog on UAT and came across this failure: https://harmony.uat.earthdata.nasa.gov/logs/7b216437-8877-4e87-b0ab-a248659ed9d3/4833911
"ERROR:root:expected str, bytes or os.PathLike object, not list\r\nTraceback (most recent call last):\r\n File "/home/dockeruser/.local/lib/python3.10/site-packages/harmony/cli.py", line 244, in _invoke\r\n (out_message, stac_output) = adapter.invoke()\r\n File "/home/dockeruser/.local/lib/python3.10/site-packages/harmony/adapter.py", line 121, in invoke\r\n return (self.message, self._process_catalog_recursive(self.catalog))\r\n File "/home/dockeruser/.local/lib/python3.10/site-packages/harmony/adapter.py", line 186, in _process_catalog_recursive\r\n output_item = self.process_item(item.clone(), source)\r\n File "/worker/net2cog/netcdf_convert_harmony.py", line 109, in process_item\r\n staged_filename = os.path.basename(cog_generated)\r\n File "/usr/local/lib/python3.10/posixpath.py", line 142, in basename\r\n p = os.fspath(p)\r\nTypeError: expected str, bytes or os.PathLike object, not list\r\n",
"{"message": "timing./home/dockeruser/.local/bin/net2cog_harmony.end", "user": "hazem.mahmoud88", "requestId": "7b216437-8877-4e87-b0ab-a248659ed9d3", "durationMs": 60681, "timestamp": "2024-09-17T16:02:20.789568Z", "level": "INFO", "application": "/home/dockeruser/.local/bin/net2cog_harmony"}\r\nTraceback (most recent call last):\r\n File "/home/dockeruser/.local/bin/net2cog_harmony", line 8, in \u003Cmodule\u003E\r\n",
" sys.exit(main())\r\n File "/worker/net2cog/netcdf_convert_harmony.py", line 144, in main\r\n",

@frankinspace frankinspace changed the title Bug report Error "expected str, bytes or os.PathLike object, not list" for harmony request Sep 18, 2024
@frankinspace frankinspace added the bug Something isn't working label Sep 18, 2024
@D-Auty
Copy link

D-Auty commented Dec 31, 2024

I'm pretty sure this is the result of various issues in handling different collections (see related issues) all "upstream" from the eventual exception. In these cases, the "list" object in question is None - intended to be the list of output files. When there is no output file, the exception is raised.

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
Status: No status
Development

No branches or pull requests

3 participants