ver 1.4.2 'from openshot.openshot import main' and " 'NoneType' object has no attribute 'set_cursor' "

Asked by elias

Hello everybody, any idea on how to fix this? it seems a bug.

OpenShot 1.4.2 was working fine, now it is displaying the error message below:

I tried to fix it by reinstalling after complete removal, also by upgrading FFmpeg, searched for locks in /var/locks, nothing worked.

$ openshot

------------------------- ERROR 1 ------------------------------
Failed to import 'from openshot import main'
Error Message: cannot import name main
----------------------------------------------------------------
--------------------------------
   OpenShot (version 1.4.2)
--------------------------------
Process no longer exists: 4328. Creating new pid lock file.

Detecting formats, codecs, and filters...
---
video_codecs:
  - a64multi
  - a64multi5
  - asv1
  - asv2
  - bmp
  - dnxhd
  - dpx
  - dvvideo
  - ffv1
  - ffvhuff
  - flashsv
  - flashsv2
  - flv
  - gif
  - h261
  - h263
  - h263p
  - huffyuv
  - jpegls
  - ljpeg
  - mjpeg
  - mpeg1video
  - mpeg2video
  - mpeg4
  - msmpeg4v2
  - msmpeg4
  - msvideo1
  - pam
  - pbm
  - pcx
  - pgm
  - pgmyuv
  - png
  - ppm
  - qtrle
  - rawvideo
  - roqvideo
  - rv10
  - rv20
  - sgi
  - snow
  - svq1
  - targa
  - tiff
  - v210
  - wmv1
  - wmv2
  - zlib
  - zmbv
  - libschroedinger
  - libtheora
  - libvpx
  - libx264
...
---
audio_codecs:
  - aac
  - ac3
  - ac3_fixed
  - alac
  - dca
  - eac3
  - flac
  - mp2
  - nellymoser
  - real_144
  - sonic
  - sonicls
  - vorbis
  - wmav1
  - wmav2
  - pcm_alaw
  - pcm_f32be
  - pcm_f32le
  - pcm_f64be
  - pcm_f64le
  - pcm_mulaw
  - pcm_s8
  - pcm_s16be
  - pcm_s16le
  - pcm_s24be
  - pcm_s24daud
  - pcm_s24le
  - pcm_s32be
  - pcm_s32le
  - pcm_u8
  - pcm_u16be
  - pcm_u16le
  - pcm_u24be
  - pcm_u24le
  - pcm_u32be
  - pcm_u32le
  - pcm_zork
  - roq_dpcm
  - adpcm_adx
  - g722
  - g726
  - adpcm_ima_qt
  - adpcm_ima_wav
  - adpcm_ms
  - adpcm_swf
  - adpcm_yamaha
  - libgsm
  - libgsm_ms
  - libmp3lame
  - libopencore_amrnb
  - libspeex
  - libvorbis
...
---
formats:
  - a64
  - ac3
  - adts
  - aiff
  - amr
  - asf
  - ass
  - asf_stream
  - au
  - avi
  - avm2
  - caf
  - cavsvideo
  - crc
  - daud
  - dirac
  - dnxhd
  - dts
  - dv
  - eac3
  - ffm
  - ffmetadata
  - filmstrip
  - flac
  - flv
  - framecrc
  - framemd5
  - g722
  - gif
  - gxf
  - h261
  - h263
  - h264
  - image2
  - image2pipe
  - ipod
  - ivf
  - m4v
  - md5
  - matroska
  - matroska
  - microdvd
  - mjpeg
  - mlp
  - mmf
  - mov
  - mp2
  - mp3
  - mp4
  - mpeg
  - vcd
  - mpeg1video
  - dvd
  - svcd
  - mpeg2video
  - vob
  - mpegts
  - mpjpeg
  - mxf
  - mxf_d10
  - null
  - nut
  - ogg
  - alaw
  - mulaw
  - f64be
  - f64le
  - f32be
  - f32le
  - s32be
  - s32le
  - s24be
  - s24le
  - s16be
  - s16le
  - s8
  - u32be
  - u32le
  - u24be
  - u24le
  - u16be
  - u16le
  - u8
  - psp
  - rawvideo
  - rm
  - RoQ
  - rso
  - rtp
  - rtsp
  - sap
  - sox
  - spdif
  - srt
  - swf
  - 3g2
  - 3gp
  - truehd
  - rcv
  - voc
  - wav
  - webm
  - yuv4mpegpipe
  - alsa
  - oss
  - sdl
...

------------------------- ERROR 2 ------------------------------
Failed to import 'from openshot.openshot import main'
Error Message: 'NoneType' object has no attribute 'set_cursor'
----------------------------------------------------------------

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!

^Z
killall openshot

************ Intended the recommended test in the message **********

$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] 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 0x7f8c1113bd20> >
>>>

****************** OTHER SOFTWARE RELATED WITH VIDEO **************************

other software, installed:

$ melt --version
MLT melt 0.7.2
Copyright (C) 2002-2011 Ushodaya Enterprises Limited
<http://www.mltframework.org/>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

******

$ x264 --version
x264 0.120.2151 a3f4407
(libswscale 2.1.100)
(libavformat 53.32.100)
(ffmpegsource 2.17.0.0)
built on Jun 19 2012, gcc: 4.4.3
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 3 or later

*********** Upgrade ffmpeg to see if it fixes the problem ************

Have upgraded ffmpeg AFTER OpenShot failure, from 0.7,? version, but OpenShot still shows the same error report.

$ ffmpeg -version
ffmpeg version 0.10.4-6:0.10.4-0ubuntu0jon2~lucid2
built on Jun 21 2012 15:14:43 with gcc 4.4.3
configuration: --extra-version='6:0.10.4-0ubuntu0jon2~lucid2' --arch=amd64 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-gnutls --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-libpulse --enable-gpl --enable-postproc --enable-x11grab --enable-libcdio --enable-version3 --enable-libdc1394 --enable-shared --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

********** Software that were not possible to upgrade **************
Could not upgrade this library:

libvpx1:
 PreDepends: multiarch-support but it is not installable

******************SOFTWARE HARDWARE ENVIRONMENT ******************
Installed on the following computer:
***************************************************************

************************ Operating System ********************
$ uname -a
Linux computer 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 18:00:34 UTC 2012 x86_64 GNU/Linux

*****************************Hardware *********************************
description: CPU
             product: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
             vendor: Intel Corp.
             physical id: 4
             bus info: cpu@0
             slot: uFC-PGA Socket
             size: 2GHz
             capacity: 2GHz
             width: 64 bits
             clock: 166MHz
             capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow cpufreq

display:0
             description: VGA compatible controller
             product: Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 03
             width: 32 bits
             clock: 33MHz
             capabilities: msi pm bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:16 memory:ffd80000-ffdfffff ioport:cff8(size=8) memory:e0000000-efffffff(prefetchable) memory:ffd40000-ffd7ffff

display:1 UNCLAIMED
             description: Display controller
             product: Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2.1
             bus info: pci@0000:00:02.1
             version: 03
             width: 32 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: latency=0
             resources: memory:ffc80000-ffcfffff
        *-multimedia
             description: Audio device
             product: N10/ICH 7 Family High Definition Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 02
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=HDA Intel latency=0
             resources: irq:22 memory:ffd3c000-ffd3ffff

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openshot Edit question
Assignee:
No assignee Edit question
Solved by:
elias
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

lsb_release -a; uname -a; apt-cache policy openshot

Thanks

Revision history for this message
elias (elias-uxmcc2) said :
#2

Andrew, thanks for your interest, here is:

lsb_release -a; uname -a; apt-cache policy openshot
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
Linux computer 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 18:00:34 UTC 2012 x86_64 GNU/Linux
openshot:
  Installed: 1.4.2-1
  Candidate: 1.4.2-1
  Version table:
 *** 1.4.2-1 0
        500 http://ppa.launchpad.net/jonoomph/openshot-edge/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
     1.4.0-1~ppa1~lucid1 0
        500 http://ppa.launchpad.net/lucid-bleed/ppa/ubuntu/ lucid/main Packages
     1.3.1-1~lucid1 0
        500 http://ppa.launchpad.net/kxstudio-team/ppa/ubuntu/ lucid/main Packages
     1.2.2-1~lucid1 0
        500 http://ppa.launchpad.net/falk-t-j/lucid/ubuntu/ lucid/main Packages
     1.2.2-1~getdeb1 0
        500 http://archive.getdeb.net/ubuntu/ lucid-getdeb/apps Packages
     1.1.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ lucid/universe Packages

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

You are using a PPA, I suggest you contact the PPA maintainer.

Revision history for this message
elias (elias-uxmcc2) said :
#4

Thank's Andrew, I do not understand what does it means that I am using PPA, but I have solved the problem as follows.

I observed that it worked in other user account, I looked for the configuration file in my account it is ~/.openshot, first I tried to remove the lock. Previously I tried to do that in /var/lock but there was none.

It did not work, then I removed all the files and directories in ~/.openshot, It worked!
here is the output of the procedure. I hope it may help someone who wants to analyse what happened. Maybe can help the developers to improve the program.

=====================================

$ cd ~/.openshot
$ tree
.
├── blender
├── config.xml
├── pid.lock
├── preview.mlt
├── queue
│   └── ########-####-####-####-############ #like uuid,I masked it
├── sequence.mlt # see below
├── thumbnail
└── user_profiles

4 directories, 5 files
$ rm -rf *
$ openshot

------------------------- ERROR 1 ------------------------------
Failed to import 'from openshot import main'
Error Message: cannot import name main
----------------------------------------------------------------
--------------------------------
   OpenShot (version 1.4.2)
--------------------------------

Detecting formats, codecs, and filters...
---
video_codecs:
  - a64multi
  - a64multi5
  - asv1
  - asv2
  - bmp
  - dnxhd
  - dpx
  - dvvideo
  - ffv1
  - ffvhuff
  - flashsv
  - flashsv2
  - flv
  - gif
  - h261
  - h263
  - h263p
  - huffyuv
  - jpegls
  - ljpeg
  - mjpeg
  - mpeg1video
  - mpeg2video
  - mpeg4
  - msmpeg4v2
  - msmpeg4
  - msvideo1
  - pam
  - pbm
  - pcx
  - pgm
  - pgmyuv
  - png
  - ppm
  - qtrle
  - rawvideo
  - roqvideo
  - rv10
  - rv20
  - sgi
  - snow
  - svq1
  - targa
  - tiff
  - v210
  - wmv1
  - wmv2
  - zlib
  - zmbv
  - libschroedinger
  - libtheora
  - libvpx
  - libx264
...
---
audio_codecs:
  - aac
  - ac3
  - ac3_fixed
  - alac
  - dca
  - eac3
  - flac
  - mp2
  - nellymoser
  - real_144
  - sonic
  - sonicls
  - vorbis
  - wmav1
  - wmav2
  - pcm_alaw
  - pcm_f32be
  - pcm_f32le
  - pcm_f64be
  - pcm_f64le
  - pcm_mulaw
  - pcm_s8
  - pcm_s16be
  - pcm_s16le
  - pcm_s24be
  - pcm_s24daud
  - pcm_s24le
  - pcm_s32be
  - pcm_s32le
  - pcm_u8
  - pcm_u16be
  - pcm_u16le
  - pcm_u24be
  - pcm_u24le
  - pcm_u32be
  - pcm_u32le
  - pcm_zork
  - roq_dpcm
  - adpcm_adx
  - g722
  - g726
  - adpcm_ima_qt
  - adpcm_ima_wav
  - adpcm_ms
  - adpcm_swf
  - adpcm_yamaha
  - libgsm
  - libgsm_ms
  - libmp3lame
  - libopencore_amrnb
  - libspeex
  - libvorbis
...
---
formats:
  - a64
  - ac3
  - adts
  - aiff
  - amr
  - asf
  - ass
  - asf_stream
  - au
  - avi
  - avm2
  - caf
  - cavsvideo
  - crc
  - daud
  - dirac
  - dnxhd
  - dts
  - dv
  - eac3
  - ffm
  - ffmetadata
  - filmstrip
  - flac
  - flv
  - framecrc
  - framemd5
  - g722
  - gif
  - gxf
  - h261
  - h263
  - h264
  - image2
  - image2pipe
  - ipod
  - ivf
  - m4v
  - md5
  - matroska
  - matroska
  - microdvd
  - mjpeg
  - mlp
  - mmf
  - mov
  - mp2
  - mp3
  - mp4
  - mpeg
  - vcd
  - mpeg1video
  - dvd
  - svcd
  - mpeg2video
  - vob
  - mpegts
  - mpjpeg
  - mxf
  - mxf_d10
  - null
  - nut
  - ogg
  - alaw
  - mulaw
  - f64be
  - f64le
  - f32be
  - f32le
  - s32be
  - s32le
  - s24be
  - s24le
  - s16be
  - s16le
  - s8
  - u32be
  - u32le
  - u24be
  - u24le
  - u16be
  - u16le
  - u8
  - psp
  - rawvideo
  - rm
  - RoQ
  - rso
  - rtp
  - rtsp
  - sap
  - sox
  - spdif
  - srt
  - swf
  - 3g2
  - 3gp
  - truehd
  - rcv
  - voc
  - wav
  - webm
  - yuv4mpegpipe
  - alsa
  - oss
  - sdl
...
state saved
on_frmMain_destroy
$

========================
note about uuid in the queue directory:
the number masked does not correspond to any uuid in /dev/disk/by-uuid/

Revision history for this message
elias (elias-uxmcc2) said :
#5

Thanks Andy,
this last issue is solved!

I found the solution in this bug report:

https://bugs.launchpad.net/openshot/+bug/1036097

For those who have the same problem, be aware that python-mlt is not automatically upgraded.

When python failed to load melt, I marked to complete remove in synaptic package manager, then I installed again, but that did not remove the python-mlt, that I found searching mlt in the installed section, where I saw it was a 0.5.x version, so I removed it manually, and installed the last version 0.8.2 at this time.