The script tries loading external files which are stored on a relative path.
To be able to read file with the Read File component, I convert the relative path in an absolute path.
But it seems like the Hops script is run from another location then where it is stored on the drive, resulting in a wrong path:
Got: Could not create a file event watcher for: C:\Program Files\Rhino 7\Plug-ins\IronPython\Lib\aec_brisesoleil\aec_brisesoleil.py: component "Read File"
Hi @AndyPayne, I’m trying to read a file that is in the same folder as the Hops definition, but without luck. It seems like Hops is still looking in the wrong folder.
Could not find file 'C:\Users\shwde\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\Hops\0.15.0\compute.geometry\test.html'.: component "Read File" (3ddee979-2be6-47d5-9175-6b8d53859e38)
and then I reference that file into a Hops component like this
Then it appears to work on my end. You have to set the path as a full path. Relative paths don’t work (to my knowledge). Also, what component are you using on the top “RelPath”?
Correct. At this moment, absolute paths are the only paths that are allowed. It is on our to do list as a feature to add (ie. relative paths)… but that isn’t currently available just yet. Sorry about that. I’ll will report back here whenever that feature is added. Thanks for the feedback.