-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comments
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. |
I was taking a look at #35 in general, and get nerd sniped into trying to reproduce this error. A couple of quick things:
I updated the request URL to specify a GeoTIFF output:
That got me to reproduce the error as above. Looking at the logging for my request, it looks like:
There's a number of different exceptions being caught during this conversion, but the logging wasn't being emitted in a way Harmony was capturing. I tweaked that logging in my recent PR so I tried that version out locally and got a bit more of a clue:
(FWIW: Looks like that's the general exception being caught here) |
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",
The text was updated successfully, but these errors were encountered: