Hello, I recently attempted to use mapbox to grab some map data. However, I am unable to even get passed API key input. After inputting my key and hitting refresh on the node, Houdini begins to compute and then errors with this message.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1/refresh", line 1, in <module>
File "labs::Sop/mapbox::2.1, PythonModule", line 39, in update
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\hou.py", line 16462, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
Currently I am on Houdini 19.0.383 py3
Unfortunately, I have no idea what is going on within the node to diagnose the issue any further. Any suggestions or others running into this?
Houdini 19 Mapbox not functioning
16758 31 14- zachagreg
- Member
- 1 posts
- Joined: Nov. 2018
- Offline
- MaiAo
- Staff
- 99 posts
- Joined: Feb. 2021
- Offline
zachagreg
Hello, I recently attempted to use mapbox to grab some map data. However, I am unable to even get passed API key input. After inputting my key and hitting refresh on the node, Houdini begins to compute and then errors with this message.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1/refresh", line 1, in <module>
File "labs::Sop/mapbox::2.1, PythonModule", line 39, in update
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\hou.py", line 16462, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
Currently I am on Houdini 19.0.383 py3
Unfortunately, I have no idea what is going on within the node to diagnose the issue any further. Any suggestions or others running into this?
Could you send us a test file to debug? If you can't post it here, you can email support@sidefx.com.
Thanks!
- Red-Juice
- Member
- 14 posts
- Joined: Aug. 2015
- Offline
Im having similar trouble..
was this ever resolved?
Error while cooking.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1, PythonModule", line 215, in <lambda>
File "labs::Sop/mapbox::2.1, PythonModule", line 62, in on_button
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:/PROGRA~2/Steam/STEAMA~1/common/HOUDIN~1/houdini/python3.7libs\hou.py", line 16489, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
was this ever resolved?
Error while cooking.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1, PythonModule", line 215, in <lambda>
File "labs::Sop/mapbox::2.1, PythonModule", line 62, in on_button
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:/PROGRA~2/Steam/STEAMA~1/common/HOUDIN~1/houdini/python3.7libs\hou.py", line 16489, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
- Red-Juice
- Member
- 14 posts
- Joined: Aug. 2015
- Offline
- deastman
- Member
- 4 posts
- Joined: May 2020
- Offline
Was this ever resolved? I'm having the same issue.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1/refresh", line 1, in <module>
File "labs::Sop/mapbox::2.1, PythonModule", line 39, in update
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.493/houdini/python3.9libs\hou.py", line 16935, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1/refresh", line 1, in <module>
File "labs::Sop/mapbox::2.1, PythonModule", line 39, in update
File "labs::Sop/mapbox::2.1, PythonModule", line 167, in refresh
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.493/houdini/python3.9libs\hou.py", line 16935, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
- Luke Kantola
- Member
- 34 posts
- Joined: Nov. 2017
- Offline
- derki
- Member
- 3 posts
- Joined: Oct. 2021
- Offline
Hey guys,
I recently hit the same wall - its known bug and sideFX support knows about it.
Meanwhile it will be fixed, here's a workaround that worked for me:
The file it is looking for is mapbox_map.html and it is supposed to live in the user preferences /Sidefxlabs/misc/mapbox/ folder.
The Sidefxlabs folder is empty.
Grab the html file from sideFX lab github [github.com] and copy it to your hoduni documents folder (user\Documents\houdini19.5\SideFXLabs\misc\mapbox) that corrected the issue.
(I save you some time and sending html file in attachment)
On github you will find "mapbox__map.html" with two underscores, just rename it to "mapbox_map.html" (only one underscore)
PS: This workaround shared SideFX support with me. It wos pointed out by one of their customer - so thank you unknown hero - you made my life easier and do not even know about it.
Wish you luck
I recently hit the same wall - its known bug and sideFX support knows about it.
Meanwhile it will be fixed, here's a workaround that worked for me:
The file it is looking for is mapbox_map.html and it is supposed to live in the user preferences /Sidefxlabs/misc/mapbox/ folder.
The Sidefxlabs folder is empty.
Grab the html file from sideFX lab github [github.com] and copy it to your hoduni documents folder (user\Documents\houdini19.5\SideFXLabs\misc\mapbox) that corrected the issue.
(I save you some time and sending html file in attachment)
On github you will find "mapbox__map.html" with two underscores, just rename it to "mapbox_map.html" (only one underscore)
PS: This workaround shared SideFX support with me. It wos pointed out by one of their customer - so thank you unknown hero - you made my life easier and do not even know about it.
Wish you luck
- swSharkBoy_02
- Member
- 10 posts
- Joined: Sept. 2019
- Offline
Hello,
I think the mapbox api for downloading heightmaps has hanged. when I type in the url:
"https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]" + str(lon) +"," + str(lat) + "," + str((zoom+1)) + "/1024x1024@2x.png?access_token=" + API_KEY
into my browser I get:
{"message":
"Legacy Static Image requests are no longer supported. To continue
making Static Image requests, please use the modern Static Images API.
See https://docs.mapbox.com/api/maps/static-images/ [docs.mapbox.com]
for more information"}
when I check the: https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/ [docs.mapbox.com]
(which is where I assume the node wants to retrieve height data based on it calling "mapbox.terrain-rgb")
It says the tile can now only be 256 or 512 "request 512×512 tiles instead of the default 256×256 tiles."
The api also now wants to have a tile number instead of long/lat in the heightmap call.
"{x} and {y} are tilename values, not geographic longitude and latitude coordinates. If you need to convert geographic coordinates to the tile coordinate names used in Slippy Map tilenames, you can use one of the libraries listed here."
so a new call looks like this:
https://api.mapbox.com/v4/mapbox.terrain-rgb/10/165/400,1024@2x.pngraw?access_token= + API_KEY
I install the mercantile package, convert long/lat to "tilename values" and add it to the call. But no.. I can only get 512X512 heightmaps to download just like the documentation said...
I feel lost. Has anyone gotten this to work? The color and OSM data works just fine. The api for heightmaps must have changed between today and March 26, 2023 based on previous posts. What the heck is going on?
I think the mapbox api for downloading heightmaps has hanged. when I type in the url:
"https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]" + str(lon) +"," + str(lat) + "," + str((zoom+1)) + "/1024x1024@2x.png?access_token=" + API_KEY
into my browser I get:
{"message":
"Legacy Static Image requests are no longer supported. To continue
making Static Image requests, please use the modern Static Images API.
See https://docs.mapbox.com/api/maps/static-images/ [docs.mapbox.com]
for more information"}
when I check the: https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/ [docs.mapbox.com]
(which is where I assume the node wants to retrieve height data based on it calling "mapbox.terrain-rgb")
It says the tile can now only be 256 or 512 "request 512×512 tiles instead of the default 256×256 tiles."
The api also now wants to have a tile number instead of long/lat in the heightmap call.
"{x} and {y} are tilename values, not geographic longitude and latitude coordinates. If you need to convert geographic coordinates to the tile coordinate names used in Slippy Map tilenames, you can use one of the libraries listed here."
so a new call looks like this:
https://api.mapbox.com/v4/mapbox.terrain-rgb/10/165/400,1024@2x.pngraw?access_token= + API_KEY
I install the mercantile package, convert long/lat to "tilename values" and add it to the call. But no.. I can only get 512X512 heightmaps to download just like the documentation said...
I feel lost. Has anyone gotten this to work? The color and OSM data works just fine. The api for heightmaps must have changed between today and March 26, 2023 based on previous posts. What the heck is going on?
Edited by swSharkBoy_02 - April 5, 2023 02:33:02
- danielftx
- Member
- 1 posts
- Joined: Oct. 2020
- Offline
I am having the same trouble as explained above. Up until recently this was working fine. I am on Houdini version 19.5.569
Traceback (most recent call last):
File "labs::Sop/mapbox::2.1, PythonModule", line 215, in <lambda>
File "labs::Sop/mapbox::2.1, PythonModule", line 62, in on_button
File "labs::Sop/mapbox::2.1, PythonModule", line 162, in refresh
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs\hou.py", line 16935, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
- MaiAo
- Staff
- 99 posts
- Joined: Feb. 2021
- Offline
swSharkBoy_02's findings are correct. Mapbox changed their API for elevation/height map access. I'm talking to Mapbox devs about this issue. We will update the tool as soon as we find a satisfactory fix.
To further clarify, the error message generated by our Mapbox node is due to missing height map, which in turn was due to height map download links stopped working.
To further clarify, the error message generated by our Mapbox node is due to missing height map, which in turn was due to height map download links stopped working.
Edited by MaiAo - April 11, 2023 10:22:53
- monci
- Member
- 1 posts
- Joined: June 2014
- Offline
Following swSharkBoy_02's findings, I did these steps to make it work (512res) while waiting for the official update.
1. pip install mercantile
2. import mercantile in the Mapbox scripts. Remember to append the path first.
3. find this line `terrain_url = "https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]" + str(lon) +"," + str(lat) + "," + str((zoom+1)) + "/1024x1024@2x.png?access_token=" + API_KEY `
4. and replaced it with
Now it should be working.
@MaiAo Any ideas of using 1024 or higher resolution for heightmap?
1. pip install mercantile
2. import mercantile in the Mapbox scripts. Remember to append the path first.
3. find this line `terrain_url = "https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]" + str(lon) +"," + str(lat) + "," + str((zoom+1)) + "/1024x1024@2x.png?access_token=" + API_KEY `
4. and replaced it with
x, y, z = mercantile.tile(lon, lat, zoom) terrain_url = f"https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y},512@2x.pngraw?access_token={API_KEY}"
Now it should be working.
@MaiAo Any ideas of using 1024 or higher resolution for heightmap?
- MaiAo
- Staff
- 99 posts
- Joined: Feb. 2021
- Offline
- liberalarts
- Member
- 39 posts
- Joined: Feb. 2017
- Offline
MaiAoIs it possible to borrow what Mapbox on steroids does and stitch multiple terrain tiles? Seems crazy to upres when Mapbox already has the data (at higher zoom levels).
Mapbox confirmed that their new API only support up to 512 now. We can look into whether there is a good way to upres it. Overall fix for the bug ETA early next week if not sooner.
Eg. High Resolution Satellite Images with Mapbox and Python [towardsdatascience.com]
Edited by liberalarts - April 18, 2023 11:24:52
- stretched
- Member
- 8 posts
- Joined: June 2014
- Offline
- Florian13
- Member
- 11 posts
- Joined: Sept. 2018
- Offline
- Alex Amos
- Member
- 28 posts
- Joined: June 2019
- Offline
- Florian13
- Member
- 11 posts
- Joined: Sept. 2018
- Offline
Alex Amos
Hey all, what's the work around to this?
I have a deadlined project and I was planning on using this as part of my pipeline, I've already spent a significant amount of time trying to fix it, now I see it's actually not an issue on my end. :o
Any suggestions would be helpful
I followed @monci instructions and was abled to use Mapbox again.
To use mercantile, you need to install pip in your Houdini folder. Just follow these instructions: https://www.youtube.com/watch?v=cIEN50WuPoc&t=86s&ab_channel=PaulAmbrosiussen [www.youtube.com]
Then, you need to edit the Mapbox HDA (Allow Editing Content, Type propertie > Scripts tab), and add "import mercantile" at the top. Then replace that line of code @monci mentioned. It should work.
Edited by Florian13 - June 28, 2023 03:56:50
- Alex Amos
- Member
- 28 posts
- Joined: June 2019
- Offline
Thanks @Florian13 !
I followed @monci's post and it's now working for me again, fantastic !
I'm disappointed in myself that I missed it yesterday.
Thanks for pointing it out.
Edit: Strange, after my initial test with the new fix, it's now giving the same error even though the code has been modified. I'll try restart my machine and see if it's some kind of weird cached issue.
Edit2: After some testing, it seems that @monci's fix is limited to a maximum zoom level of 14, anything higher will produce the same error as before, even though you can see up to level 18 under the Look Up feature.
I followed @monci's post and it's now working for me again, fantastic !
I'm disappointed in myself that I missed it yesterday.
Thanks for pointing it out.
Edit: Strange, after my initial test with the new fix, it's now giving the same error even though the code has been modified. I'll try restart my machine and see if it's some kind of weird cached issue.
Edit2: After some testing, it seems that @monci's fix is limited to a maximum zoom level of 14, anything higher will produce the same error as before, even though you can see up to level 18 under the Look Up feature.
Edited by Alex Amos - May 6, 2023 06:50:29
- CoulterH
- Member
- 6 posts
- Joined: March 2023
- Offline
- Tofu
- Member
- 4 posts
- Joined: Jan. 2017
- Offline
I have also encountered this problem. When will it be fixed? Even with the temporary solution mentioned above, the limit of 512*512 is still too large, and the current node seems unstable and often triggers errors that cannot be located. Whenever I try to locate it, it reports an error. I hope it can be restored to its previous state.
-
- Quick Links