You are not logged in.
Hi there ArcLinux forum of awesomenes.
I got problem with my Openshot installation.
i have tried to fix this problem by both remove/reinstall openshot/mlt/mlt-python-bindings and cheeked my locale.gen file.
Nothing works ![]()
------------------------- ERROR 1 ------------------------------
Failed to import 'from openshot import main'
Error Message: cannot import name main
----------------------------------------------------------------
------------------------- ERROR 2 ------------------------------
Failed to import 'from openshot.openshot import main'
Error Message: Non-ASCII character '\xc2' in file /usr/lib/python3.4/site-packages/cairo/__init__.py on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (__init__.py, line 2)
----------------------------------------------------------------
OpenShot has failed to import some of the Python files or libraries
required for our application to run. Here are some trouble shooting
tips:
Tip 1) Check if MLT can be successfully imported in Python. Run the
following commands, and see if any errors are displayed. If you get
an error, you need to investigate the correct way to install MLT.
NOTE: Do not type the $ or >> characters in the examples below.
$ python
>> import mlt
>> mlt.Factory().init()
Tip 2) If MLT is working from the first example, then the next tip is
to look at the above error messages very closely, and google for more
help. It's likely the problem is already reported, and maybe there is
a simple work-around. Also, you can search for bugs or report a new
bug at https://bugs.launchpad.net/openshot. Good luck!But If i understand it correctly Openshot have problem whit python3 because when i do
$python3
>>> import mlt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'mlt'
>>>exit()
$python2
>>> import mlt
>>> mlt.Factory().init()
<mlt.Repository; proxy of <Swig Object of type 'Mlt::Repository *' at 0x7f49db191e40> >
>>>exit()Can any one give me a hint how i force Openshot to use python2 instead?
Thanks.
Last edited by r00tr4t (2014-08-19 18:08:13)
Offline
Can any one give me a hint how i force Openshot to use python2 instead?
Openshot from the Arch community repo is already using Python 2. Are you really using Arch Linux or some other distro?
Offline
No i'm on Arch.
$ uname -a
Linux Phanter-ArcLinux 3.15.5-2-ARCH #1 SMP PREEMPT Fri Jul 11 07:56:02 CEST 2014 x86_64 GNU/Linux
$ pacman -Q openshot mlt mlt-python-bindings
openshot 1.4.3-3
mlt 0.9.2-1
mlt-python-bindings 0.9.2-1The thing is if i
$ cat /usr/bin/openshot
#!/usr/bin/python2
...
..Butt the error message says it do not find the mlt library in /usr/lib/python3.4/site-packages/cairo/
That got me thinking maybe it is a Python problem.
Thanks for your help. ![]()
Offline
If you start openshot from a terminal, it should use Python 2. So I don't see how you got a Python 3 error message.
Offline
It should use python2 but it uses python3 because the error message says so.
------------------------- ERROR 2 ------------------------------
Failed to import 'from openshot.openshot import main'
Error Message: Non-ASCII character '\xc2' in file /usr/lib/python3.4/site-packages/cairo/__init__.py on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (__init__.py, line 2)
----------------------------------------------------------------Any one got any ides ?
Offline
How are you starting openshot? From a menu of some kind? or from a command line?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
First i tried to start from awesome wm but it did not work then i went in to gnome-terminal tried to start it that way.
Offline
Okay. I had asked because menu programs might not read the shebang in line one of the program. I know it is read when launched from a shell.
Also, you install from the AUR, Community, or did you install it by hand?
What if you launch it from a shell as python2 openshot
and lastly, what is the output of head $(which openshot)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Hmm interesting.
$ python2 openshot
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python3.4/site-packages/__main__.py", line 5, in <module>
from .colorize import Configuration
ValueError: Attempted relative import in non-packageOffline
Very odd. Maybe you have some borked environment variables, e.g. PYTHONPATH? What does "env|grep -i python" give you? Obviously exec is a bit confused and uses the wrong Python library directory.
Offline
Yes
$ env | grep python
PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/usr/lib/python3.4/site-packages/Offline
Yes
$ env | grep python PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/usr/lib/python3.4/site-packages/
Where is this variable set? PYTHONPATH should not be defined at all on a standard Arch install. Get rid of this and I bet OpenShot will work. ![]()
Offline
r00tr4t wrote:Yes
$ env | grep python PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/usr/lib/python3.4/site-packages/Where is this variable set? PYTHONPATH should not be defined at all on a standard Arch install. Get rid of this and I bet OpenShot will work.
Magic. It works.
I have PYTHONPATH in my /etc/profile and i think it had something to do with getting vim to work with Python a few month back.
Commented it out and rebooted the computer and now Openshot works ![]()
Thanks a 10e9. ![]()
Offline
Reporting back on an old issue as i figured out why i needed the
PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/usr/lib/python3.4/site-packages/The arduino-ino package from AUR gives this message if you run it with out PYTHONPATH variable.
Traceback (most recent call last):
File "/usr/local/bin/ino", line 3, in <module>
from ino.runner import main
ImportError: No module named ino.runnerOffline
Same issue here. I solved it by changing the library mlt 0.9.6-7 (extra) -> mlt-git v0.9.2.r247.ge06718f-1 (aur).
Offline