Open fcannini opened 6 years ago
This is strange. I've just opened the binary release of 2.79b, opened the terminal and typed bpy.ops.object.modifier_add(type=-'SUBSURF')
. The default cube turned into something rounder, as expected, so they haven't moved this operation. Can you try doing the same thing? Open the blender GUI; you can get the console by selecting "Scripting" from the screen layout dropdown just to the right of the "Help" menu.
I've downloaded the binary release to my notebook to compare results. Both on my notebok and the compiled one the result is the same:
>>> bpy.ops.object.modifier_add(type=-'SUBSURF')
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
TypeError: bad operand type for unary -: 'str'
Hello there.
Is there anything else I can do to help you?
Sorry, now that I look again I see a typo in what I asked you to try! There shouldn't be a minus sign -
, it should be bpy.ops.object.modifier_add(type='SUBSURF')
That worked, the cube changed to a kind of 8-sided sphere. What's next?
Well, we now know that your Blender can handle SUBSURF. In that case the problem with bpy.ops.object.modifier_add(type='SUBSURF')
probably lies in the object that it is trying to add the modifier to, which is the unit cell box. What happens if you run ascii-phonons with the --no_box
argument?
Now with --no_box
both examples worked!
I see 30 kesterite####.png
files and 30 angles####.png
files each. YAY!
While generating .gif through ascii-phonons --no_box --gif -o angles angles.ascii
an odd thing happens.
The file is created but ascii-phonons barfs out in the end:
convert: unable to open image `/home/user/ascii-phonons-1.0.0/examples/tmp7i14pyf90030.png': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open file `/home/user/ascii-phonons-1.0.0/examples/tmp7i14pyf90030.png' @ png.c/ReadPNGImage/2889.
Traceback (most recent call last):
File "/path/to/ascii-phonons/1.0/bin/ascii-phonons", line 91, in <module>
ascii_phonons.call_blender(**options)
File "/path/to/external/python/3.5-gnu-5.3/lib/python3.5/site-packages/ascii_phonons/__init__.py", line 194, in call_blender
remove(f)
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/ascii-phonons-1.0.0/examples/tmp7i14pyf90030.png'
/me scratches head.
I'm assuming your username is not user
, and something is going wrong when it tries to put those paths together? (Or did you substitute your username for user in the output for privacy?)
Did it literally say File "/path/to/ascii-phonons/1.0/bin/ascii-phonons", line 91, in <module>
in your output? /path/to/ascii-phonons looks like a placeholder rather than a real path
I'll have a think about ways of reproducing the box issue. ascii-phonons
is a tricky package to maintain because of the odd way it boostraps itself into Blender. Perhaps there is a way of cleaning this up a bit.
Yes, it's a placeholder. I've tried to change the path, remove any *ascii*
or *phonons*
from it and see if something happens, but the barf persists.
(I've seen bugs in flexlm where the daemon would trip on its own feet if there was flexlm
in the path)
Hello, I recently updated my blender version from 2.76 , and I met the same problem. The blender 2.76 can work with perfectly with the ascii-phonon code but the blender 2.79b and 2.80 cannot. I also checked the "bpy.ops.object.modifier_add(type='SUBSURF')" to make sure it was used correctly but the problem still exists for blender 2.79b.
Thanks for narrowing down the versions involved. It seems that I will need to rewrite the bounding box code in a way that works with newer versions of Blender.
I have pushed a version of ascii-phonons to Master that just eliminates the SUBSURF step on the bounding box. It's not really clear to me now why it was necessary in the first place. The problem was in the way objects are selected rather than in SUBSURF itself; "fixing" the code leads to a pretty strange-looking result so I'm just ripping it out for now.
Master should now work with 2.79, would be good to know if it works on some other people's setups. In particular, 2.79 seems to be required for recent versions of Mac OS! Older versions mysteriously freeze while rendering...
Apparently Blender 2.8 includes a big Python API overhaul, so some more maintenance is probably going to be needed for future compatibility.
Hello there.
I'm trying to run ascii-phonons 1.0 on the following scenario: OS = centos 6.5 x86_64 CC = gcc 5.3.0 Python = 3.5.5 Numpy = 1.14.2 Requests = 2.18.4 Blender = 2.79b compiled with the following options: (output from cmake -L)
The blender executable is found by *which blender, but when trying to execute both ascii-phonons or ascii-phonons-gui it barfs the same error message:
I had to compile blender because the binary release segfaults even when using 2.19 libc shared libraries via LD_PRELOAD.
Any clue where the error might be?
Thanks for any help, Fabricio