tin2tin / Blender_Screenwriter

Blender add-on for writing screenplays and convert them directly into timed storyboards.
193 stars 20 forks source link

PDF export seems broken #22

Closed tin2tin closed 3 years ago

tin2tin commented 3 years ago

Seems to be related to this: https://github.com/vilcans/screenplain/issues/53

AndreaMonzini commented 3 years ago

Hello, there is a discussion to integrate the libharulibrary http://libharu.org/ in Blender:

https://lists.blender.org/pipermail/bf-committers/2020-December/050808.html

https://developer.blender.org/T83192

Maybe it could be useful for Blender_Screenwriter PDF export too ;

tin2tin commented 3 years ago

Thank you. I didn't know about that. Could be nice if they would support exporting text from the text editor too.

If you're on Linux, can you test if the various modules install successfully, by simply installing the Blender Screenwriter add-on?

AndreaMonzini commented 3 years ago

Yes, i just tried to install the last addon version on Blender 2.91 but i see this error :

Traceback (most recent call last):
  File "/app/blender/2.91/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/linux/.var/app/org.blender.Blender/config/blender/2.91/scripts/addons/Blender_Screenwriter-master/__init__.py", line 13, in <module>
    import bpy, subprocess, pip
ModuleNotFoundError: No module named 'pip'

pip seems installed in my system:

linux@pop-os:~$ pip -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)
tin2tin commented 3 years ago

Ok. Could you reload load it and try again? (I updated a file)

AndreaMonzini commented 3 years ago

i installed pip manually with the instructions we tested in the past and it works:

'/home/linux/App/blender-2.91.0-linux64/2.91/python/bin/python3.7m' -m ensurepip
'/home/linux/App/blender-2.91.0-linux64/python/bin/python3.7m' -m pip install screenplain[PDF]

Now i try to use a clean Blender to check the addon update

AndreaMonzini commented 3 years ago

I tried the updated addon with Blender 2.83.9 ( and 2.90.1 ) but Blender crashed

linux@pop-os:~$ '/home/linux/App/blender-2.83.9-linux64/blender' 
found bundled python: /home/linux/App/blender-2.83.9-linux64/2.83/python
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr2 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
reloading addon: Blender_Screenwriter-master 1610634536.7753696 1610634573.4030187 '/home/linux/.config/blender/2.83/scripts/addons/Blender_Screenwriter-master/__init__.py'
Modules Installed () from '/home/linux/Downloads/Blender_Screenwriter-master.zip' into '/home/linux/.config/blender/2.83/scripts/addons'
Aborted (core dumped)
tin2tin commented 3 years ago

Could you try again? (I've tried something else)

AndreaMonzini commented 3 years ago

Now no crash ( 2.83.9 ) but this error:

Traceback (most recent call last):
  File "/home/linux/.config/blender/2.83/scripts/addons/Blender_Screenwriter-master/__init__.py", line 51, in <module>
    import screenplain.parsers.fountain as fountain
ModuleNotFoundError: No module named 'screenplain'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linux/App/blender-2.83.9-linux64/2.83/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/linux/.config/blender/2.83/scripts/addons/Blender_Screenwriter-master/__init__.py", line 53, in <module>
    subprocess.check_call([pybin, '-m', 'pip', 'install', 'screenplain[PDF]'])
  File "/home/linux/App/blender-2.83.9-linux64/2.83/python/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/linux/App/blender-2.83.9-linux64/blender', '-m', 'pip', 'install', 'screenplain[PDF]']' returned non-zero exit status 1

Console:

Read prefs: /home/linux/.config/blender/2.83/config/userpref.blend
found bundled python: /home/linux/App/blender-2.83.9-linux64/2.83/python
unknown argument, loading as file: -m
Error: Cannot read file '/home/linux/-m': No such file or directory
Error: argument has no '.blend' file extension, not using as new file, exiting! /home/linux/-m
Saved session recovery to '/tmp/quit.blend'

Blender quit
Read prefs: /home/linux/.config/blender/2.83/config/userpref.blend
found bundled python: /home/linux/App/blender-2.83.9-linux64/2.83/python
unknown argument, loading as file: -m
Error: Cannot read file '/home/linux/-m': No such file or directory
Error: argument has no '.blend' file extension, not using as new file, exiting! /home/linux/-m
Saved session recovery to '/tmp/quit.blend'

Blender quit
Traceback (most recent call last):
  File "/home/linux/.config/blender/2.83/scripts/addons/Blender_Screenwriter-master/__init__.py", line 51, in <module>
    import screenplain.parsers.fountain as fountain
ModuleNotFoundError: No module named 'screenplain'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linux/App/blender-2.83.9-linux64/2.83/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/linux/.config/blender/2.83/scripts/addons/Blender_Screenwriter-master/__init__.py", line 53, in <module>
    subprocess.check_call([pybin, '-m', 'pip', 'install', 'screenplain[PDF]'])
  File "/home/linux/App/blender-2.83.9-linux64/2.83/python/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/linux/App/blender-2.83.9-linux64/blender', '-m', 'pip', 'install', 'screenplain[PDF]']' returned non-zero exit status 1.
tin2tin commented 3 years ago

In the python console in Blender, what does it write when you enter these two separate lines?

import sys
print(sys.executable)
AndreaMonzini commented 3 years ago

py

tin2tin commented 3 years ago

Oh, it is not pointing to the python.exe on linux...

Is it the same on 2.91?

2.91 on Windows: image

tin2tin commented 3 years ago

I've changed it to the previous python.exe location code(this will cause a reminder on 2.91 to update to code).

AndreaMonzini commented 3 years ago

2.91: py2

AndreaMonzini commented 3 years ago

python folder structure: bl

tin2tin commented 3 years ago

So how does that version install in 2.91?

(The current version on the repository is using the presumably 2.83 friendly code )

AndreaMonzini commented 3 years ago

Both Blender 2.83 and 2.91 seem to work now ! I used a clean download of Blender 2.91 and deleted ~home/.config/blender folders ( i plan to to more tests on this weekend )

tin2tin commented 3 years ago

That's great news. Thank you. Closing all of the pdf related bug reports now.