Can't run
That's it. When I run
$ python OpenShot.py
it says:
Traceback (most recent call last):
File "OpenShot.py", line 21, in <module>
import windows.MainGTK as MainGTK
File "/home/
import classes.project
File "/home/
import thumbnail as thumbnail
File "/home/
import mltpp
ImportError: No module named mltpp
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
It looks like you don't have the MLT framework installed. You will need to manually compile MLT and generate the Python bindings for MLT. There are instructions on MLT's website on how to generate the Python bindings: http://
Revision history for this message
|
#2 |
Do I have to use SWIG or something? The page you linked to is not informative at all.
Revision history for this message
|
#3 |
Yes, you have to use SWIG to generate the Python bindings.
1) Here are the instructions for installing MLT
http://
2) Download the mlt source code and mlt++ source code
https:/
3) Inside the MLT++/swig/ folder are scripts to generate the Python bindings
4) Copy the new Python bindings into your "site packages" folder
To verify everything works, open up a Python shell, and type:
import mltpp
If it doesn't give you an error then OpenShot should work.
Thanks,
Jonathan
Revision history for this message
|
#4 |
Now it's saying:
ImportError: No module named _mltpp
Revision history for this message
|
#5 |
When you generate the Python bindings for MLT, it creates 2 files that need to be added to your /site-packages/ folder:
1) mltpp.py
2) _mltpp.so
Double check that both files are in your /site-packages/ folder, and let's see if that fixes your error. Of course, after you do this, be sure to launch a new Python console... so it sees the new /site-packages/ files.
Good luck! =)
Revision history for this message
|
#6 |
I tried compiling MLT with the guide in the README file. But "sudo make clean" is saying something weird:
hohoo@dell:
list='src/framework src/inigo src/valerie src/miracle src/humperdink src/albino src/modules profiles'; \
for subdir in $list; do \
make -s -C $subdir depend || exit 1; \
make -C $subdir clean || exit 1; \
done
make[1]: Siirrytään hakemistoon "/home/
rm -f mlt_frame.o mlt_geometry.o mlt_deque.o mlt_property.o mlt_properties.o mlt_events.o mlt_parser.o mlt_service.o mlt_producer.o mlt_multitrack.o mlt_playlist.o mlt_consumer.o mlt_filter.o mlt_transition.o mlt_field.o mlt_tractor.o mlt_factory.o mlt_repository.o mlt_pool.o mlt_tokeniser.o mlt_profile.o mlt_log.o mlt_cache.o libmlt.so.0.3.9 libmlt.so
make[1]: Poistutaan hakemistosta "/home/
make[1]: Siirrytään hakemistoon "/home/
rm -f inigo.o io.o inigo
make[1]: Poistutaan hakemistosta "/home/
make[1]: Siirrytään hakemistoon "/home/
rm -f valerie.o valerie_notifier.o valerie_parser.o valerie_response.o valerie_status.o valerie_tokeniser.o valerie_util.o valerie_remote.o valerie_socket.o libvalerie.so.0.3.9 libvalerie.so
make[1]: Poistutaan hakemistosta "/home/
make[1]: Siirrytään hakemistoon "/home/
rm -f miracle.o miracle_log.o miracle_server.o miracle_
make[1]: Poistutaan hakemistosta "/home/
make[1]: Siirrytään hakemistoon "/home/
rm -f client.o io.o remote.o humperdink
make[1]: Poistutaan hakemistosta "/home/
make[1]: Siirrytään hakemistoon "/home/
rm -f albino.o albino
make[1]: Poistutaan hakemistosta "/home/
filter_sox.c:40:44: error: missing binary operator before token "("
filter_sox.c:46:44: error: missing binary operator before token "("
filter_sox.c:82:43: error: missing binary operator before token "("
filter_
filter_
filter_
filter_
filter_
filter_
make[2]: *** [depend] Virhe 1
make[1]: *** [depend] Virhe 1
make: *** [clean] Virhe 1
hohoo@dell:
("Virhe" means "Error")
Revision history for this message
|
#7 |
You might try disabling sox, and see if it will compile. Just add --disable-sox to the ./configure command.
Revision history for this message
|
#8 |
Now make clean works, but make says:
/usr/bin/ld: cannot find -lbz2
Revision history for this message
|
#9 |
Try installing the bzip2 package. If you are using Ubuntu, I think this is the command to install it:
sudo apt-get install libbz2
Otherwise, look around your package manager for the bzip2 package. Good luck.
Revision history for this message
|
#10 |
Got that working but now what is this supposed to say?
$ ./configure python
Configuring python ... [: 42: 1: unexpected operator
[: 42: 1: unexpected operator
$
Revision history for this message
|
#11 |
Not sure about this one. Are you typing the "./configure python" command? Or is MLT trying to run that command during the build process?
Also, I'm not sure if you have read the updated README for OpenShot, but I just recently added instructions for installing MLT. You might have a look: http://
Revision history for this message
|
#12 |
I'm doing it just like the README says.
Revision history for this message
|
#13 |
I would be sure you have the Python-dev package installed. Other than that, if it still gives you an error, I would suggest emailing the MLT mailing list. I've installed MLT 4 or 5 times now, but I'm no expert on MLT by any means. Good luck!
Revision history for this message
|
#14 |
I got the same errors on a freshly insted jaunty (ubuntu 9.04).
however the swig-process successfully creates all the necessary files. Just ls -l the python directory...
I just copied over goocanvas-libs from /usr/local/
However, when I try to load a mts-movie (generated by dvgrab from my canon hv20) I got:
user@host:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/home/
mltpp.
NotImplementedE
Possible C/C++ prototypes are:
init(char const *)
Mlt:
/home/user/
return gtk.glade.
A new frmMain has been created
on_mnuImportFil
Failed to import file: /media/
on_mnuImportFil
on_mnuImportFil
on_mnuImportFil
on_mnuQuit1_
however the GUI shows up and looks nice (but since I only got m2t...)
Revision history for this message
|
#15 |
I would make sure that your MLT installation is correct. First, I would make sure FFMPEG is working. Try using the "ffplay" command to watch a local video file. If that works, then I would try the demos that come with MLT? I think they are located in the ~/mlt_trunk/
I just setup MLT on a new 9.04 Ubuntu install, and I had to build MLT a few times... until I got the ./configure will the correct options. Each time I tested MLT with the demos in the /mlt/demo/ folder. Finally the demos worked, and I knew I had installed it correctly.
Revision history for this message
|
#16 |
Just as a follow-up, there is now a build wizard available for download. It will help install all of the dependencies, and hopefully fix the problems mentioned above. Hopefully...
Revision history for this message
|
#17 |
These errors are solved by the new build wizard.