Error during launch

Asked by Majestic on 2008-03-10

I am getting the following error if I launch lottanzb. I have followed the installation step.

Traceback (most recent call last):
  File "/usr/bin/lottanzb", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/pkg_resources.py", line 2179, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg/lottanzb/lottanzb.py", line 6, in ?
    from prefs import Prefs
  File "/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg/lottanzb/prefs.py", line 2, in ?
    from xml.etree.ElementTree import ElementTree, Element, SubElement
ImportError: No module named etree.ElementTree

Do you have any idea what is going wrong here.

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
LottaNZB Edit question
Assignee:
No assignee Edit question
Last query:
2008-03-27
Last reply:
2008-04-03
Majestic (raymond-de-vries) said : #1

Install Information

running install
running bdist_egg
running egg_info
writing lottanzb.egg-info/PKG-INFO
writing top-level names to lottanzb.egg-info/top_level.txt
writing dependency_links to lottanzb.egg-info/dependency_links.txt
writing entry points to lottanzb.egg-info/entry_points.txt
reading manifest file 'lottanzb.egg-info/SOURCES.txt'
writing manifest file 'lottanzb.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/__init__.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/util.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/prefs.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/gui.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/paths.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/firstrun.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/backend.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/prefsgui.py -> build/bdist.linux-i686/egg/lottanzb
copying build/lib/lottanzb/lottanzb.py -> build/bdist.linux-i686/egg/lottanzb
creating build/bdist.linux-i686/egg/lottanzb/data
copying build/lib/lottanzb/data/lottanzb.glade -> build/bdist.linux-i686/egg/lottanzb/data
copying build/lib/lottanzb/data/logo.png -> build/bdist.linux-i686/egg/lottanzb/data
copying build/lib/lottanzb/data/icon.png -> build/bdist.linux-i686/egg/lottanzb/data
creating build/bdist.linux-i686/egg/lottanzb/po
creating build/bdist.linux-i686/egg/lottanzb/po/de
creating build/bdist.linux-i686/egg/lottanzb/po/de/LC_MESSAGES
copying build/lib/lottanzb/po/de/LC_MESSAGES/lottanzb.po -> build/bdist.linux-i686/egg/lottanzb/po/de/LC_MESSAGES
copying build/lib/lottanzb/po/de/LC_MESSAGES/lottanzb.mo -> build/bdist.linux-i686/egg/lottanzb/po/de/LC_MESSAGES
creating build/bdist.linux-i686/egg/lottanzb/po/fr
creating build/bdist.linux-i686/egg/lottanzb/po/fr/LC_MESSAGES
copying build/lib/lottanzb/po/fr/LC_MESSAGES/lottanzb.po -> build/bdist.linux-i686/egg/lottanzb/po/fr/LC_MESSAGES
copying build/lib/lottanzb/po/fr/LC_MESSAGES/lottanzb.mo -> build/bdist.linux-i686/egg/lottanzb/po/fr/LC_MESSAGES
creating build/bdist.linux-i686/egg/lottanzb/po/nl
creating build/bdist.linux-i686/egg/lottanzb/po/nl/LC_MESSAGES
copying build/lib/lottanzb/po/nl/LC_MESSAGES/lottanzb.po -> build/bdist.linux-i686/egg/lottanzb/po/nl/LC_MESSAGES
copying build/lib/lottanzb/po/nl/LC_MESSAGES/lottanzb.mo -> build/bdist.linux-i686/egg/lottanzb/po/nl/LC_MESSAGES
byte-compiling build/bdist.linux-i686/egg/lottanzb/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/util.py to util.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/prefs.py to prefs.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/gui.py to gui.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/paths.py to paths.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/firstrun.py to firstrun.pyc
byte-compiling build/bdist.linux-i686/egg/lottanzb/backend.py to backend.pyc
  File "build/bdist.linux-i686/egg/lottanzb/backend.py", line 373
    confArg = ((" -c " + paths.clientDir("hellanzb.conf")) if not Prefs.lotta["frontend_mode"] else "")
                                                            ^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-i686/egg/lottanzb/prefsgui.py to prefsgui.pyc
  File "build/bdist.linux-i686/egg/lottanzb/prefsgui.py", line 85
    self.generalFields[field].set_active((True if preference else False))
                                                ^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-i686/egg/lottanzb/lottanzb.py to lottanzb.pyc
installing package data to build/bdist.linux-i686/egg
running install_data
creating build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/not-zip-safe -> build/bdist.linux-i686/egg/EGG-INFO
copying lottanzb.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
creating 'dist/lottanzb-0.1-py2.4.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing lottanzb-0.1-py2.4.egg
removing '/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg' (and everything under it)
creating /usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg
Extracting lottanzb-0.1-py2.4.egg to /usr/lib/python2.4/site-packages
  File "/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg/lottanzb/backend.py", line 373
    confArg = ((" -c " + paths.clientDir("hellanzb.conf")) if not Prefs.lotta["frontend_mode"] else "")
                                                            ^
SyntaxError: invalid syntax
  File "/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg/lottanzb/prefsgui.py", line 85
    self.generalFields[field].set_active((True if preference else False))
                                                ^
SyntaxError: invalid syntax
lottanzb 0.1 is already the active version in easy-install.pth
Installing lottanzb script to /usr/bin

Installed /usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg
Processing dependencies for lottanzb==0.1
Finished processing dependencies for lottanzb==0.1

Severin Heiniger (severinh) said : #2

Hi Majestic,

the syntax errors that occured during building LottaNZB must be a result of the fact you're using Python 2.4. Our team uses Python 2.5 to develop the application and as I'm fairly new to Python programming I don't know exactly which language constructs were newly introduced in Python 2.5. [...] I just took a lock at the python documentation and as it seems, one-line conditional expressions [1] is a new feature in Python 2.5 Wasn't aware of that. Sorry. I guess LottaNZB should support Python 2.4, so I'll make these problematic statements Python 2.4-friendly tonight. You might consider installing Python 2.5 in the meantime and give it another try.

As for the launch failure: If you're a Ubuntu user, make sure the package python-elementtree is installed on your system (type "sudo apt-get install python-elementtree"). If you're a Gentoo user, aVirulence should be able to help you.

[1] http://docs.python.org/whatsnew/pep-308.html

Severin Heiniger (severinh) said : #3

According to [1] the elementtree bug seems to be a Python 2.4 related problem as well. The way we import this module in LottaNZB only applies to Python 2.5. I guess it won't be hard to make it work under Python 2.4 though.

My advise: Install Python 2.5 for the time being if you can't wait until we release a Python 2.4-friendly version of LottaNZB. If I'm not completely wrong it should even be possible to have multiple versions of Python on one machine at the same time.

[1] http://effbot.org/zone/element-index.htm#installation

Severin Heiniger (severinh) said : #4

Good news: Just added Python 2.4 compatibilty, nevertheless I recommend you to install Python 2.5.

Majestic (raymond-de-vries) said : #5

Hi Severin,

I updated the Lotta distibution and compiled it. No error during this. But do get errors when I start to load lottanzb. Am getting the following.

raymond@Rifbox:~/lottanzb$ lottanzb
INFO Starting LottaNZB 0.2-pre using Python 2.4.4.
INFO The LottaNZB configuration could not be found. Starting configuration assistant.
INFO Created the LottaNZB directory /home/raymond/.lottanzb/.
/usr/lib/python2.4/site-packages/lottanzb-0.1-py2.4.egg/lottanzb/util.py:8: GtkWarning: gtk_radio_button_set_group: assertion `!g_slist_find (group, radio_button)' failed
  gtk.glade.XML.__init__(self, paths.dataDir("lottanzb.glade"), root)
Segmentation fault (core dumped)

Does this mean that python2.4 is not fully supported.

Regards,

Majestic

Severin Heiniger (severinh) said : #6

Hi Majestic,

first of all, we don't recommend to use the development version of LottaNZB as it still has some major bugs we need to fix before the next release. But if it's just for testing purposes like in your case, we're always glad to get feedback. ;-)

Launching LottaNZB with Python 2.4.5 works fine on my machine. The warning "GtkWarning: gtk_radio_button_set_group" doesn't affect the execution at all, it also appears with Python 2.5. It's not a Python related problem.

As for the segmentation fault: I keep randomly running into those and I haven't figured out yet why they appear. It must be a PyGTK related problem. Have you tried launching LottaNZB a second time? Maybe the segmentation fault disappears? :-/ You could also try running LottaNZB from the source directory (python lottanzb.py). I'm afraid I can't give you an "real" answer at this point.

Severin Heiniger (severinh) said : #7

I just fixed the radio button GtkWarning... But I guess this doesn't solve your problem. ;-)

Majestic (raymond-de-vries) said : #8

Hi Severin,

Thank you for your quick replay. I am using python 2.4.4. The image I use is ubuntu 6.10 edgy.
The system reports that I have the latest version of python available for this image. Upgrading
to 7.04 doesn't work for me as that CPU I use isn’t supported.

For your info, the error shows when I start LottaNZB in terminal from the source dir. I tried restarting
LottaNZB but this will give the same error.

Thx,

Majestic

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens Severin Heiniger
Verzonden: Saturday, March 22, 2008 9:43 AM
Aan: <email address hidden>
Onderwerp: Re: [Question #26775]: Error during launch

Your question #26775 on LottaNZB changed:
https://answers.edge.launchpad.net/lottanzb/+question/26775

    Status: Open => Needs information

Severin Heiniger requested for more information:
Hi Majestic,

first of all, we don't recommend to use the development version of
LottaNZB as it still has some major bugs we need to fix before the next
release. But if it's just for testing purposes like in your case, we're
always glad to get feedback. ;-)

Launching LottaNZB with Python 2.4.5 works fine on my machine. The
warning "GtkWarning: gtk_radio_button_set_group" doesn't affect the
execution at all, it also appears with Python 2.5. It's not a Python
related problem.

As for the segmentation fault: I keep randomly running into those and I
haven't figured out yet why they appear. It must be a PyGTK related
problem. Have you tried launching LottaNZB a second time? Maybe the
segmentation fault disappears? :-/ You could also try running LottaNZB
from the source directory (python lottanzb.py). I'm afraid I can't give
you an "real" answer at this point.

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.edge.launchpad.net/lottanzb/+question/26775

You received this question notification because you are a direct
subscriber of the question.

Severin Heiniger (severinh) said : #9

Hi Majestic,

thanks for the additional information. Segmentation faults aren't so easy to track down as no error information is displayed on the command line. I'm afraid I'm not experienced in things like that at all. One thing you could do is a backtrace, which might lead us to the source of the problem but I guess this doesn't solve the problem itself. aVirulence, who initially started the LottaNZB project, is Dutch and might be able to assist you better than I can. If you think this isn't worth the effort you could try other HellaNZB GUIs for the time being.

Regards,
Lantash

Majestic (raymond-de-vries) said : #10

Hi Severin,aVirulence,

Thank you for your answer. I would like to help where I can. I am not a expert in this either.
I do have some additional info for you I not sure if this tells anything. I upgraded the system to
Xubuntu 7.04. This is using python 2.5. I installed lottanzb source 0.1 and I am getting the same
Error.

Does this tell you something.

Regards,

Majestic

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:bowwwsetup Inf
<email address hidden>] Namens Severin Heiniger
Verzonden: Tuesday, March 25, 2008 7:57 PM
Aan: <email address hidden>
Onderwerp: RE: [Question #26775]: Error during launch

Your question #26775 on LottaNZB changed:
https://answers.edge.launchpad.net/lottanzb/+question/26775

    Status: Open => Answered

Severin Heiniger proposed the following answer:
Hi Majestic,

thanks for the additional information. Segmentation faults aren't so
easy to track down as no error information is displayed on the command
line. I'm afraid I'm not experienced in things like that at all. One
thing you could do is a backtrace, which might lead us to the source of
the problem but I guess this doesn't solve the problem itself.
aVirulence, who initially started the LottaNZB project, is Dutch and
might be able to assist you better than I can. If you think this isn't
worth the effort you could try other HellaNZB GUIs for the time being.

Regards,
Lantash

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.edge.launchpad.net/lottanzb/+question/26775/+confirm?answer_id=8

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.edge.launchpad.net/lottanzb/+question/26775

You received this question notification because you are a direct
subscriber of the question.

Majestic: it seems to be a PyGTK problem. Downgrading from 2.12.1 to 2.12.0 resolves the "gtk.glade.XML.__init__(self, paths.dataDir("lottanzb.glade"), root)" error.
Source: http://forums.gentoo.org/viewtopic-t-621515-view-next.html

Can you help with this problem?

Provide an answer of your own, or ask Majestic for more information if necessary.

To post a message you must log in.