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

KeyError: 'content' #14

Open
joreeves opened this issue Jun 26, 2024 · 17 comments
Open

KeyError: 'content' #14

joreeves opened this issue Jun 26, 2024 · 17 comments

Comments

@joreeves
Copy link

Occasionally get this error for no reason. If I change some of the settings sometimes it goes away.

image

@Piminski
Copy link

Started getting similar issues as well. As you mentioned changing the parameters can resolve it but I cannot describe yet what exactly is the cause, seems to be min dist and/or max error...

It may be something has changed on the Google side....

@joreeves
Copy link
Author

I've found the problem. It's an edge case where there is only 1 child which has no "content" in it. I've created a pull request.

@Piminski
Copy link

image
I downloaded your new HDA and test hip file but I get this error

@joreeves
Copy link
Author

@Piminski With the updates I made the "scripts" folder needs to be placed relative to your houdini file. Sorry I should've stated that (I guess that's a downside to moving the scripts outside of Houdini). Could you try opening the EarthMesh_Test.hip file and let me know if you get the same error there?

@xjorma
Copy link
Owner

xjorma commented Jun 28, 2024 via email

@xjorma
Copy link
Owner

xjorma commented Jun 28, 2024

I submitted a blind fix.

Sorry, @joreeves. I will investigate a bit more. Your fix is certainly more tested than mine. Your code is definitely cleaner, tests more edge cases elegantly, and it's a good idea to have Python as an external file (I dislike the fact that everything is embedded in a binary file in Houdini or Touchdesigner).

However, I wanted more time to see if external files are really a good idea for the end-user (ie; script folder relative path). Additionally, there are too many refactors. Your code is definitely better and easier to maintain, but I also have some local changes to make it work with Houdini Engine (within Unreal, for example).

Can someone validate the fix? or provide me a screen shot with the parameter that cause the issue? (don't forget to make sure your key is not visible)

@joreeves
Copy link
Author

@xjorma all good. It may not be the best solution to have external files. I prefer them that way for tracking on github but obviously it means having to keep the files relative to the hda which is not ideal. Maybe there's a better solution out there that combines both.

@joreeves
Copy link
Author

@xjorma I believe I found a good solution for this. I will create a new pull request. Feel free to use it if you like or re-implement if you'd prefer.

@xjorma
Copy link
Owner

xjorma commented Jun 29, 2024

@joreeves cool let me know

@Piminski
Copy link

Piminski commented Jul 1, 2024

@joreeves Thank you for your efforts. I am a bit new to github so I might be doing things wrong. I cloned the repo locally using command line but I seem to be getting the old version, I do not understand how to get your version for testing. I tried git clone on the pull request as well. Any advice is appreciated. I tried chatgpt but she was not helpful ;)

@joreeves
Copy link
Author

joreeves commented Jul 1, 2024

@Piminski try this (assuming on windows):

First make sure there isn't a folder named EarthMeshHoudini in the location you want to clone to. Open a cmd prompt. You can run cd PATH/TO/FOLDER to change your directory you are installing to.

Then try running git clone https://github.com/joreeves/EarthMeshHoudini.git

If cloning isn't working you can also download a zip directly from github. Just click on the "code" button then select "Download ZIP"
image

@Piminski
Copy link

Piminski commented Jul 1, 2024

@joreeves Thank you!

I think I have managed to get it working! Meshes are currently loading, hurrah!

One thing I was thinking is that the HDA starts loading meshes immediately so if the latitude changes it loads before one can change the longitude. I have been doing workarounds by disabling the node or removing the API key but I though an "load Mesh" button would be great. I even made a very basic/stupid HDA wrapping the Earthmesh in a subnet with a switch to a null. Maybe this a separet issue but as I mentioned I am not used to the git process yet.

Thanks to you and David again, this tool is so very useful.

@joreeves
Copy link
Author

joreeves commented Jul 1, 2024

@Piminski Yeah, I noticed that as well and a button is a good idea. If you want to avoid it automatically loading for now a workaround I've been using is switching Houdini from "Auto Update" to "Manual" or your method sounds good as well.

@Piminski
Copy link

Hey @joreeves

It was all working well but for some reason it has stopped working. I had a functioning setup using the Earthmesh2:0 hda where I cached everything out to bgeo.sc files, when I now try to regenerate it gives the same error I described before. I have the scripts folder in the project folder relative to the hip file.

I am sorry to bother you.

Have you experienced anything similar? Has anything changed? Any advice is appreciated?

Screenshot 2024-07-22 175208
Screenshot 2024-07-22 175840

@joreeves
Copy link
Author

joreeves commented Jul 23, 2024 via email

@joreeves
Copy link
Author

Hey @Piminski so I think it might be an installation issue. Sorry I changed things around a few times back when i was making these fixes. If you are using the latest version (which I believe you are) the scripts folder no longer needs to be relative to your project. It should live in a stationary folder. Here's the install instructions:

  • Download the repo.
  • Place the EarthMeshHoudini folder somewhere on your local drive. It's important that you do not install EarthMeshHoudini directly into your $HOME/houdiniXX.X directory or into any other default Houdini installation directory, or else it may not properly be loaded when you start Houdini.
  • Configure the Google API Key in the EarthMesh.json file and change the EARTHMESH_PATH to the path where you placed the EarthMeshHoudini folder.
  • Copy the EarthMesh.json file to your $HOME/houdiniXX.X/packages folder.

Could you check to see if you have the EarthMesh.json file in your $HOME/houdiniXX.X/packages folder? And if so, where does the EARTHMESH_PATH variable point to. That's where the scripts should live. Let me know if that helps.

@Piminski
Copy link

Thank you @joreeves!

That seemed to fix it. I had the hda inside the documents/Houdini. Now per your instruction it works again. I cannot understand why it worked before but anyways.

The API credential in the json it makes the autostarting-download even more of an issue but I just put a wrong code in there and let it fail when I put the node

xjorma pushed a commit that referenced this issue Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants