OpenShotno longer opens in Arch Linux

Asked by Burt DeFrancesco

OpenShot no longer opens in Arch Linux, it used to but now it doesn't. When I try to run OpenShot from the terminal I receive the following error:

------------------------- ERROR 1 ------------------------------
Failed to import 'from openshot import main'
Error Message: cannot import name main
----------------------------------------------------------------

(process:2802): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.
--------------------------------
   OpenShot (version 1.4.0)
--------------------------------

------------------------- ERROR 2 ------------------------------
Failed to import 'from openshot.openshot import main'
Error Message: unsupported locale setting
----------------------------------------------------------------

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!

This is what I get when I check to see if MLT is working:

Python 2.7.2 (default, Jun 29 2011, 11:10:00)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mlt
>>> mlt.Factory().init()
<mlt.Repository; proxy of <Swig Object of type 'Mlt::Repository *' at 0x7fa841b9fc00> >
>>>

I have tried running the debug.py script but it does not work under Arch, I get this error message:

-----------------------------------------------------------
OpenShot Debug File 0.0.2 - 2011-11-14 14:57:10.085927
-----------------------------------------------------------
This file contains a list of installed packages related to OpenShot,
locations of files, and a list of shared libraries used by python-mlt.

Traceback (most recent call last):
  File "debug.py", line 40, in <module>
    process = subprocess.Popen(["lsb_release","-a"], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I'm guessing this is because the script was intended for use in Ubuntu and other .deb based distros. Is there a way to edit debug.py for use in Arch?

I have tried also tried to uninstall and re-install both OpenShot and MLT but the problem persists.

system info:
Arch Linux 64-bit (system fully up to date as of this writing)
Nvidia driver 285.05.09
openshot 1.4.0-1
mlt 0.7.6-1
mlt-python-bindings 0.7.6-1

Any help would be appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenShot Video Editor Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Girard
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Girard (eolinwen) said :
#1

Hi,
>>I'm guessing this is because the script was intended for use in Ubuntu and other .deb based distros. Is there a way to edit debug.py for use in Arch?
You could use any kind of editor or EDI for that. For sample, Gedit or Geany without none problem.

Your problem seems to be a locale problem.
Try to reconfigure your locale. But I don't know the command for Arch system. You should try to see in the Arch wiki or Arch forum how to release this operation.
Any way you have the good version of MLT so to this side it is okay.
Good luck

Revision history for this message
Burt DeFrancesco (evilrobot-deactivatedaccount) said :
#2

Thanks for the response,

Just to be clear, are you referring to the setting of the system language that the user uses?

If so, I did a check to see what languages are in use the command is "locale" (just in case you wanted to know) and this is what was displayed:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

I guess LC_CTYPE, LC_MESSAGES and LC_ALL could be the culprit. I'll do some more reading to see what they should be set to and how to set them.

Revision history for this message
Best Olivier Girard (eolinwen) said :
#3

The solution for that could be reconfigure your locale but I don't know if the command for a Debian system is the same for an ARch system.
Another thing that I have seen on another thread is perhaps a bug in the 0.7.6 version of MLT about the locales. After, I must said that we don't know how to resolve it. The only solution seems to upgrade at a next version. It seems to be another regression of MLT.

Revision history for this message
Burt DeFrancesco (evilrobot-deactivatedaccount) said :
#4

Thank you Cenwen, re-configuring locale fixed it and it is the same command that you would use for a Debian system. :) Steps to resolve are posted below.

First open /etc/locale.gen with nano:
nano /etc/locale.gen

Then uncomment:
en_US.UTF-8 UTF-8
en_US ISO-8859-1

Now run:
locale-gen

You should then see a "Generating locals" message when that is done run:
locale

Hopefully you will see an output similar to this:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=C
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Now you should be able to open OpenShot.

Revision history for this message
Burt DeFrancesco (evilrobot-deactivatedaccount) said :
#5

Thanks Cenwen, that solved my question.

Revision history for this message
Olivier Girard (eolinwen) said :
#6

Thanks for the feedback and to learn me that 's the same on an Arch than on an Debian. :-)