Helder Oliveira
heldrida
About Me
EXPERTISE
Developer
INDUSTRY
VR
Houdini Skills
Availability
Not Specified
Recent Forum Posts
How to set output range via python? Nov. 11, 2021, 3:49 p.m.
antc
ropnode = hou.node('/out/mantra1')
ropnode.parm('trange').set(1) # 'Render Frame Range' mode
ropnode.parmTuple('f').set((1,10,1)) # start, end, step
That is great! thank you very much
How to set output range via python? Nov. 11, 2021, 1:40 p.m.
Hi,
I'd like to know how to set output range via Python?
Found about `setPlaybackRange`, but need to set the output range, instead, programmatically.
Thanks!
I'd like to know how to set output range via Python?
Found about `setPlaybackRange`, but need to set the output range, instead, programmatically.
Thanks!
Houdini 18.5 mangles with code or character encoding Nov. 11, 2021, 12:48 p.m.
Hey,
I'm on Houdini Apprentice 19 Python 3 and a friend who's a professional in the field running 18.5 Python 2.
While running a script, I created for him, which fetches data from a URL, the following error is thrown:
```
('\xf0\x9f\xa4\xa1 Oops! Failed to request the weather', InvalidSchema(u"No connection adapters were found for '2h2t2t2p2s2:2/2/2n2o2o2d2l2e2s2-2w2e2a2t2h2e2r2-2a2p2i2-292v2l2y222.2o2n2d2i2g2i2t2a2l2o2c2e2a2n2.2a2p2p2/2w2e2a2t2h2e2r2/2'",))
```
You might've not notice but if you ignore the `2`, it's an actually `https://foobar` address.
Here's where this originated from:
```
requests.get(apiUrl.replace('$id', str(currFrame))).json()
```
This does NOT happen if the URL is hard-typed. I have now changed this to use python formatter:
```
requests.get(apiUrl.format(str(currFrame))).json()
```
I should've done that at first, but I'm not a Python developer (I code in other languages, but Python is
quite simple to pickup and write).
I'll have to wait for his feedback on that, as I'm running Python 3 and he is on Python 2
My expectation is the `.format(...)` will solve the issue. Also, removed double quotes and used single quotes,
for wrapping strings
```
variableName="foobar"
```
Is now
```
variableName='foobar'
```
Thanks for reading!
I'm on Houdini Apprentice 19 Python 3 and a friend who's a professional in the field running 18.5 Python 2.
While running a script, I created for him, which fetches data from a URL, the following error is thrown:
```
('\xf0\x9f\xa4\xa1 Oops! Failed to request the weather', InvalidSchema(u"No connection adapters were found for '2h2t2t2p2s2:2/2/2n2o2o2d2l2e2s2-2w2e2a2t2h2e2r2-2a2p2i2-292v2l2y222.2o2n2d2i2g2i2t2a2l2o2c2e2a2n2.2a2p2p2/2w2e2a2t2h2e2r2/2'",))
```
You might've not notice but if you ignore the `2`, it's an actually `https://foobar` address.
Here's where this originated from:
```
requests.get(apiUrl.replace('$id', str(currFrame))).json()
```
This does NOT happen if the URL is hard-typed. I have now changed this to use python formatter:
```
requests.get(apiUrl.format(str(currFrame))).json()
```
I should've done that at first, but I'm not a Python developer (I code in other languages, but Python is
quite simple to pickup and write).
I'll have to wait for his feedback on that, as I'm running Python 3 and he is on Python 2
My expectation is the `.format(...)` will solve the issue. Also, removed double quotes and used single quotes,
for wrapping strings
```
variableName="foobar"
```
Is now
```
variableName='foobar'
```
Thanks for reading!