I have this problem with Python, i dont can run correctly the python code, with the list length information.
Please help me!!!
I have this problem with Python, i dont can run correctly the python code, with the list length information.
Please help me!!!
Hi,
Is it something to do with setting list access on your input?
Note that you can use for value in x
to access the values directly
yes, something is wrong with the acces the values of list lenght
i don´t know, what kind of option to select, if it is item acces, list access… en then, bool, float, str… a think there is the problem but i can´t solve it.
tough to see the error, but I would bet you need to set your type hint, (on the input connected to the honeybee component values), to FLOAT, not INT.
You only really need one input (x) set to list access and then your code could be like this
for item in x:
if item >0 and <98.69:
#do something```
post a sample file! Not one with the honey bee/plugin components, but a sample file.
Make some random numbers, and put them into you python component. Then post that file.
also, it looks like you might be trying to create/fine some ranges of values? ie, which values fall into which ranges…maybe?
FORMA.rar (1.9 MB)
I think you have changed the wrong entry. Set the type on x to list access and delete the count entry. Use my or @dharman’s looping method.
You can use count= len(x)
if you need the length of x elsewhere in your script
Ok, aside from the helpful advice you are receiving, here are a few other tips.
There are lots of folks on this forum that are happy to help, but it always starts with an example file and and, to the best of your ability, a brief description of the problem.
Example.gh (15.0 KB)