IndexError: list assignment index out of range

Bug #471437 reported by Peter
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

On ArchLinux, after launch:

 File "/usr/bin/openastro.py", line 6069, in <module>
    mainWindow()
  File "/usr/bin/openastro.py", line 2807, in __init__
    self.tempfilename = openAstro.makeSVG()
  File "/usr/bin/openastro.py", line 1305, in makeSVG
    module_data = ephemeris.ephData(self.year,self.month,self.day,self.hour,self.geolon,self.geolat,self.altitude,self.planets,self.zodiac,db.astrocfg)
  File "/usr/lib/python2.6/site-packages/openastromod/swiss.py", line 91, in __init__
    self.planets_sign[i]=x
IndexError: list assignment index out of range

Revision history for this message
Pelle van der Scheer (pellesimon) wrote :

What version of archlinux are you using?

Was there any error messages when installing the package?

Revision history for this message
Peter (nemp-pycckuu) wrote : Re: [Bug 471437] Re: IndexError: list assignment index out of range

В сообщении от Суббота 14 ноября 2009 03:50:42 вы написали:
> What version of archlinux are you using?
>
> Was there any error messages when installing the package?
>

Arch uses a "rolling release" system, with new packages provided daily. Its
package management permits users to keep systems up-to-date.

No, I do not see any errors during installation.

Revision history for this message
Julian Zubek (zubekj) wrote :

I am also Arch user and got the same bug. After some research in source code I have discovered that it is a problem with pySqlite: starting from version 2.4.1 it demands input in Unicode instead of Python bytestrings. I found a quick workaround:

sqlite3.dbapi2.register_adapter(str, lambda s:s.decode('utf-8'))

This should be invoked before opening the database, for example in openAstroSqlite.open() in openAstro.py.

Revision history for this message
Glenn Smith (glenn-smith) wrote :

On Ubuntu Karmic I get exactly the same symptoms. No error message at install time.

Revision history for this message
fano05 (spazzatura) wrote :

Hi,
I sorry, but I don't speak very well English.I get too the same problem :

File "/usr/bin/openastro.py", line 6070, in <module>
    mainWindow()
  File "/usr/bin/openastro.py", line 2807, in __init__
    self.tempfilename = openAstro.makeSVG()
  File "/usr/bin/openastro.py", line 1305, in makeSVG
    module_data = ephemeris.ephData(self.year,self.month,self.day,self.hour,self.geolon,self.geolat,self.altitude,self.planets,self.zodiac,db.astrocfg)
  File "/usr/lib/python2.6/dist-packages/openastromod/swiss.py", line 91, in __init__
    self.planets_sign[i]=x
IndexError: list assignment index out of range.

I don't make myself... HELP!
Thanks very much, Stéphane.

Revision history for this message
Hieronymus (jeromethivierge) wrote :

Same error in Lucid Lynx

Revision history for this message
aurejac (arnaud-aurejac) wrote :

On 2010-08-14
with Lucid 64 :
arnaud@DAVIS:~$ /usr/bin/openastro.py
Traceback (most recent call last):
  File "/usr/bin/openastro.py", line 6070, in <module>
    mainWindow()
  File "/usr/bin/openastro.py", line 2807, in __init__
    self.tempfilename = openAstro.makeSVG()
  File "/usr/bin/openastro.py", line 1305, in makeSVG
    module_data = ephemeris.ephData(self.year,self.month,self.day,self.hour,self.geolon,self.geolat,self.altitude,self.planets,self.zodiac,db.astrocfg)
  File "/usr/lib/python2.6/dist-packages/openastromod/swiss.py", line 91, in __init__
    self.planets_sign[i]=x
IndexError: list assignment index out of range

Thank you to get off this bug.

Arnaud

Revision history for this message
Hieronymus (jeromethivierge) wrote :

I think it is a translation problem.

I did what Kanor told us to do here
http://forum.ubuntu-fr.org/viewtopic.php?id=410923&p=2
and now Openastro can launch itself

-----------------------------------

You have to change some code in the file /usr/bin/openastro.py

Console :

sudo gedit /usr/bin/openastro.py

Look for these lines :

try:
  TRANSLATION["default"] = gettext.translation("openastro",TDomain)
except IOError:
  TRANSLATION["default"] = gettext.translation("openastro",TDomain,languages=['en'])
  print "OpenAstro.org has not yet been translated in your language!"

And change them for these lines :

#try:
# TRANSLATION["default"] = gettext.translation("openastro",TDomain)
#except IOError:
TRANSLATION["default"] = gettext.translation("openastro",TDomain,languages=['en'])
# print "OpenAstro.org has not yet been translated in your language!"

It is a encoding problem

next time you lauch OpenAstro, do it this way in console:

openastro.py --dbcheck

Revision history for this message
a. k. (tuhatkauno) wrote :

> Date: Sat, 14 Aug 2010 19:50:05 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 471437] Re: IndexError: list assignment index out of range
>
> I think it is a translation problem.
>
> I did what Kanor told us to do here
> http://forum.ubuntu-fr.org/viewtopic.php?id=410923&p=2
> and now Openastro can launch itself
>
> -----------------------------------
>
> You have to change some code in the file /usr/bin/openastro.py
>
> Console :
>
> sudo gedit /usr/bin/openastro.py
>
> Look for these lines :
>
> try:
> TRANSLATION["default"] = gettext.translation("openastro",TDomain)
> except IOError:
> TRANSLATION["default"] = gettext.translation("openastro",TDomain,languages=['en'])
> print "OpenAstro.org has not yet been translated in your language!"
>
> And change them for these lines :
>
> #try:
> # TRANSLATION["default"] = gettext.translation("openastro",TDomain)
> #except IOError:
> TRANSLATION["default"] = gettext.translation("openastro",TDomain,languages=['en'])
> # print "OpenAstro.org has not yet been translated in your language!"
>
> It is a encoding problem
>
> next time you lauch OpenAstro, do it this way in console:
>
> openastro.py --dbcheck
>
> --

Cheers for the tip. I did everything described, and now I get yet another different bug:

Traceback (most recent call last):
  File "/usr/local/bin/openastro.py", line 6068, in <module>
    db = openAstroSqlite()
  File "/usr/local/bin/openastro.py", line 678, in __init__
    self.cursor.execute(sql,values)
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

... ;P

Revision history for this message
fano05 (spazzatura) wrote :

Same...

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and trying to help make Ubuntu better. However, it seems that you are not using a software package provided by the official Ubuntu repositories. Because of this the Ubuntu project can not support or fix your particular bug. Please report this bug to the provider of the software package. Thanks!
If you are interested in learning more about software repositories and Ubuntu the following pages should be informative:
1. http://www.ubuntu.com/community/ubuntustory/components - information about Ubuntu repositories
2. https://help.ubuntu.com/community/Repositories - information regarding managing repositories.

Changed in ubuntu:
status: New → Invalid
Revision history for this message
doom3d (doom3d) wrote :

I had the same problem with Ubuntu 10.04 and openastro.org 1.1.23. I followed the instruction that Hieronymus wrote on 2010-08-14. Now it works for me, even from the start menu.
 Thanks.

Revision history for this message
doom3d (doom3d) wrote :

 I cannot save entries to database where the name or location contains non-english characters like "éáűőúöüó".
It works propely with Paks city, and doesn't work with Szekszárd city, Mr. Kovács, or Hajdú-Bihar county etc.
 I don't know if it is related to the original bug, or to the bugfix described above, or independent.

Revision history for this message
emygdio (rodrigo-emygdio) wrote :

Hi,

   I had the same problem, and I made the changes in source code, and error is the same.

Thanks

Changed in openastro.org:
assignee: nobody → Pelle van der Scheer (pellesimon)
status: New → Confirmed
Revision history for this message
Pelle van der Scheer (pellesimon) wrote :

Can anyone still reproduce this?

Changed in openastro.org:
status: Confirmed → Incomplete
importance: Undecided → Medium
Revision history for this message
Pelle van der Scheer (pellesimon) wrote :

I'm marking this as resolved. If anyone still has this problem, please comment.

Changed in openastro.org:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.