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

ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3 #2

Open
npc203 opened this issue Mar 26, 2020 · 1 comment

Comments

@npc203
Copy link

npc203 commented Mar 26, 2020

here's my full issue:

D:\Github\openstreetmap-heatmap>blender -b -P run_script.py
Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 09:44 AM)
Read prefs: C:\Users\HP\AppData\Roaming\Blender Foundation\Blender\2.80\config\u
serpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.80\python
Info: Deleted 3 object(s)
Info: Deleted 3 object(s)
Number of points : 177
C:\Program Files\Blender Foundation\Blender\2.80\python\lib\site-packages\pyproj
\crs\crs.py:53: FutureWarning: '+init=:' syntax is deprecated.
':' is the preferred initialization method. When making the cha
nge, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/g
otchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
C:\Program Files\Blender Foundation\Blender\2.80\python\lib\site-packages\pyproj
\crs\crs.py:294: FutureWarning: '+init=:' syntax is deprecated.
':' is the preferred initialization method. When making the ch
ange, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/
gotchas.html#axis-order-changes-in-proj-6
projstring = _prepare_from_string(" ".join((projstring, projkwargs)))
Traceback (most recent call last):
File "", line 1, in
File "D:\Github\openstreetmap-heatmap\run_script.py", line 30, in
exec(compile(open(file).read(), scriptFile, 'exec'))
File "render_osm_data.py", line 179, in
heatmap_barplot(hist, colormap=cm.viridis)
File "render_osm_data.py", line 105, in heatmap_barplot
mat = utils.simple_material(color[:3])
File "D:\Github\openstreetmap-heatmap\utils.py", line 11, in simple_material
mat.diffuse_intensity = 0.9
AttributeError: 'Material' object has no attribute 'diffuse_intensity'

Blender quit

D:\Github\openstreetmap-heatmap>blender -b -P run_script.py
Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 09:44 AM)
Read prefs: C:\Users\HP\AppData\Roaming\Blender Foundation\Blender\2.80\config\u
serpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.80\python
Info: Deleted 3 object(s)
Info: Deleted 3 object(s)
Number of points : 177
C:\Program Files\Blender Foundation\Blender\2.80\python\lib\site-packages\pyproj
\crs\crs.py:53: FutureWarning: '+init=:' syntax is deprecated.
':' is the preferred initialization method. When making the cha
nge, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/g
otchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
C:\Program Files\Blender Foundation\Blender\2.80\python\lib\site-packages\pyproj
\crs\crs.py:294: FutureWarning: '+init=:' syntax is deprecated.
':' is the preferred initialization method. When making the ch
ange, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/
gotchas.html#axis-order-changes-in-proj-6
projstring = _prepare_from_string(" ".join((projstring, projkwargs)))
Traceback (most recent call last):
File "", line 1, in
File "D:\Github\openstreetmap-heatmap\run_script.py", line 30, in
exec(compile(open(file).read(), scriptFile, 'exec'))
File "render_osm_data.py", line 179, in
heatmap_barplot(hist, colormap=cm.viridis)
File "render_osm_data.py", line 105, in heatmap_barplot
mat = utils.simple_material(color[:3])
File "D:\Github\openstreetmap-heatmap\utils.py", line 12, in simple_material
mat.diffuse_color = diffuse_color
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain
4 items, not 3

Blender quit

@aehrath-gretel
Copy link

aehrath-gretel commented May 4, 2020

I have a fix for this and Blender > 2.8 errors. I opened a PR for this: #3 you could give it a whirl.

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

2 participants