pierrejean-coudert / pwytter

Automatically exported from code.google.com/p/pwytter
0 stars 0 forks source link

Pwytter 0.8 / Ubuntu Linux 8.04 == fail to start, theme error: list index out of range #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using Ubuntu 8.04, I downloaded pwytter 0.8 and attempted to install it via
the python setuptools.
I had to manually install setuptools and some misc. python libraries.

However, even after this I faced an error with pwCache missing. I copied
those pwcache.py files into the /usr/lib/..../pwytter-0.8-py2.5.egg
directory, which solved that issue, apparently.

However, now pwytter dies immediately when run.

The backtrace is included below:
--------------------------------------
tobyc@arya:~$ pwytter.py 
Starting Pwytter...
Linux Theme tuning
Traceback (most recent call last):
  File "/usr/bin/pwytter.py", line 5, in <module>
    pkg_resources.run_script('pwytter==0.8', 'pwytter.py')
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448, in
run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1166, in
run_script
    execfile(script_filename, namespace, namespace)
  File
"/usr/lib/python2.5/site-packages/pwytter-0.8-py2.5.egg/EGG-INFO/scripts/pwytter
.py",
line 966, in <module>
    app = MainPanel(master=rootTk)
  File
"/usr/lib/python2.5/site-packages/pwytter-0.8-py2.5.egg/EGG-INFO/scripts/pwytter
.py",
line 121, in __init__
    self._loadTheme(self._params['theme'])
  File
"/usr/lib/python2.5/site-packages/pwytter-0.8-py2.5.egg/EGG-INFO/scripts/pwytter
.py",
line 199, in _loadTheme
    self.Theme=pwTheme.pwTheme(aName)
  File "/usr/lib/python2.5/site-packages/pwytter-0.8-py2.5.egg/pwTheme.py",
line 31, in __init__
    self.setTheme(aName)
  File "/usr/lib/python2.5/site-packages/pwytter-0.8-py2.5.egg/pwTheme.py",
line 37, in setTheme
    self.themeName = self.themeList[0]
IndexError: list index out of range

Original issue reported on code.google.com by dryfter@gmail.com on 29 Oct 2008 at 2:06

GoogleCodeExporter commented 9 years ago
Looks like Pwytter tries to find the theme directory in whatever directory you 
are
launching the program from. This assumption is fine for the Windows version but 
it is
not a good assumption when the program is running on Linux. If you run the 
installed
pwytter.py file from the main source directory, it works fine. The pwTheme.py 
file
should take advantage of __file__ to find out where the module is located
(os.path.dirname (__file__)). This won't work with a py2exe build since 
__file__ does
not exist so both cases have to be handled. Also, theme files don't get 
installed
with Pwytter.

Original comment by nickles....@gmail.com on 24 Mar 2009 at 5:09

GoogleCodeExporter commented 9 years ago
Looks like the try method that I tested is already implemented in trunk. Should 
have
checked out trunk before making the last comment. However, I don't like the 
design of
pwytter.py importing pwTheme which then imports values from pwytter.py. 
__app_path__
should probably be defined in another module which will be imported by both
pwytter.py and pwTheme.

Original comment by nickles....@gmail.com on 24 Mar 2009 at 5:45