Yiyotop / pyrail

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

TypeError: string indices must be integers, not str #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Traceback (most recent call last):
  File "pyRO-RAIL.py", line 3723, in <module>
  File "pyRO-RAIL.py", line 1083, in __init__
  File "pyRO-RAIL.py", line 3211, in LoadSettings
  File "pyRO-RAIL.py", line 2932, in ReadState
  File "pyRO-RAIL.py", line 3561, in UpdateMercSkillOptions

Original issue reported on code.google.com by leeandr...@gmail.com on 2 Feb 2011 at 7:59

Attachments:

GoogleCodeExporter commented 8 years ago
all of this basically forbids me to open pyro rail, at all. can't start so to 
speak.

Original comment by leeandr...@gmail.com on 2 Feb 2011 at 8:00

GoogleCodeExporter commented 8 years ago
Interesting. I have never seen an error such as this. I suspect what is going 
on based on the traceback, is that there is something in your RAIL_State file 
that is unable to be parse correctly. Please post your RAIL_State file and I'll 
see how its borking.

In the mean time, delete the state_loc.txt file that pyRO-RAIL creates (in the 
directory that you've stored pyRO-RAIL) before launching it. This will allow 
pyRO-RAIL to at least launch, but since the code is having errors reading, it 
won't be of much use until the issue is resolved. If the syntax of your 
RAIL_State file is correct, I'll write an update.

Original comment by landstei...@gmail.com on 2 Feb 2011 at 7:24

GoogleCodeExporter commented 8 years ago
Ok I'll send it here.

Original comment by leeandr...@gmail.com on 3 Feb 2011 at 12:22

Attachments:

GoogleCodeExporter commented 8 years ago
Ok I'll send it here.

Original comment by leeandr...@gmail.com on 3 Feb 2011 at 12:22

GoogleCodeExporter commented 8 years ago
Please remove line 246: rail_state["SkillOptions"]["BuffBasePriority"] = 40

It seems as if '"BuffBasePriority"' was not included in the invalid key list, 
so when  pyRO-RAIL read this, it decided to thrown an error (and rightfully so!)

Tomorrow I will write an additional exception rule for key values that are not 
numbers.

Thanks for the heads up! When you write the file after using this, it will 
again add the BuffBasePriority line to your file until I release an update.

Original comment by landstei...@gmail.com on 3 Feb 2011 at 12:51

GoogleCodeExporter commented 8 years ago
nice it worked!

Original comment by leeandr...@gmail.com on 3 Feb 2011 at 2:46

GoogleCodeExporter commented 8 years ago
Version 202.7 fixes this issue; please upgrade to avoid future conflict :D

Original comment by landstei...@gmail.com on 4 Feb 2011 at 6:44

GoogleCodeExporter commented 8 years ago
Done! Thanks for the update!

Original comment by leeandr...@gmail.com on 5 Feb 2011 at 4:09