Ticket #172 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Umit Crash - 'string indices must be integers'

Reported by: chal61@… Owned by: zero
Priority: high Milestone: Umit 1.0
Component: CrashReport Version: current svn
Keywords: user crash Cc:

Description (last modified by luis) (diff)

Crash Report
==========

sys.platform linux2
os.name posix
Gtk version 2.12.9
Umit version 0.9.5

Description


Versions:
---
GTK: 2.12.9
PyGTK: 2.14.2
HIGWidgets: 0.9.5
Python: 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
Nmap: Nmap version 4.53 ( http://insecure.org )
Operating System: Linux P2869 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686
Umit: 0.9.5
UmitCore: 0.9.5
UmitGUI: 0.9.5
---
<type 'exceptions.TypeError'>
Python 2.5.2: /usr/bin/python
Mon Nov  3 09:20:24 2008

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/share/umit/umitGUI/MainWindow.py in _load_scan_results_cb(self=<MainWindow object at 0x83c693c (GtkWindow at 0x843f190)>, p=<gtk.Action object at 0x83c675c (GtkAction at 0x8455f08)>)
  676 
  677         if (self._results_filechooser_dialog.run() == gtk.RESPONSE_OK):
  678             self._load(filename=self._results_filechooser_dialog.get_filename())
  679 
  680         self._results_filechooser_dialog.destroy()
self = <MainWindow object at 0x83c693c (GtkWindow at 0x843f190)>
self._load = <bound method MainWindow._load of <MainWindow object at 0x83c693c (GtkWindow at 0x843f190)>>
filename undefined
self._results_filechooser_dialog = <ResultsFileChooserDialog object at 0x8974d4c (GtkFileChooserDialog at 0x85c31c8)>
self._results_filechooser_dialog.get_filename = <built-in method get_filename of ResultsFileChooserDialog object at 0x8974d4c>

 /usr/share/umit/umitGUI/MainWindow.py in _load(self=<MainWindow object at 0x83c693c (GtkWindow at 0x843f190)>, filename='/home/clsv/P3029-firstattempt.usr', parsed_result=None, title=None)
  727             # Parse result
  728             f = open(filename)
  729             scan_page.parse_result(f)
  730             scan_page.saved_filename = filename
  731 
scan_page = <ScanNotebookPage object at 0x8962e64 (GtkVBox at 0x8498d50)>
scan_page.parse_result = <bound method ScanNotebookPage.parse_result of <...Page object at 0x8962e64 (GtkVBox at 0x8498d50)>>
f = <closed file '/home/clsv/P3029-firstattempt.usr', mode 'r' at 0x834a7b8>

 /usr/share/umit/umitGUI/ScanNotebook.py in parse_result(self=<ScanNotebookPage object at 0x8962e64 (GtkVBox at 0x8498d50)>, file_to_parse=<closed file '/home/clsv/P3029-firstattempt.usr', mode 'r' at 0x834a7b8>)
  655         self.status.set_parsing_result()
  656         ####
  657         self._parse(file_to_parse=file_to_parse)
  658 
  659         ####
self = <ScanNotebookPage object at 0x8962e64 (GtkVBox at 0x8498d50)>
self._parse = <bound method ScanNotebookPage._parse of <ScanNo...Page object at 0x8962e64 (GtkVBox at 0x8498d50)>>
file_to_parse = <closed file '/home/clsv/P3029-firstattempt.usr', mode 'r' at 0x834a7b8>

 /usr/share/umit/umitGUI/ScanNotebook.py in _parse(self=<ScanNotebookPage object at 0x8962e64 (GtkVBox at 0x8498d50)>, file_to_parse=<closed file '/home/clsv/P3029-firstattempt.usr', mode 'r' at 0x834a7b8>, parsed_result=None)
  807                                 options=self.parsed.profile_options,
  808                                 description=self.parsed.profile_description,
  809                                 annotation=self.parsed.profile_annotation)
  810             del(profile)
  811 
annotation undefined
self = <ScanNotebookPage object at 0x8962e64 (GtkVBox at 0x8498d50)>
self.parsed = <umitCore.NmapParser.NmapParserSAX object at 0x88d17ec>
self.parsed.profile_annotation = u''

 /usr/share/umit/umitCore/UmitConf.py in add_profile(self=<umitCore.UmitConf.CommandProfile object at 0x891442c>, profile_name=u'Intense Scan', **attributes={'annotation': u'', 'command': u'nmap -T Aggressive -A -v %s', 'description': u'', 'hint': u'', 'options': u'Aggressive,Version detection,Verbose,Operating system detection'})
  218 
  219         for opt in options:
  220             if options[opt]:
  221                 self._set_it(profile_name, opt, options[opt])
  222         self.save_changes()
options = u'Aggressive,Version detection,Verbose,Operating system detection'
opt = u'A'
<type 'exceptions.TypeError'>: string indices must be integers
    __class__ = <type 'exceptions.TypeError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.TypeError object at 0x890d88c>
    __dict__ = {}
    __doc__ = 'Inappropriate argument type.'
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.TypeError object at 0x890d88c>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.TypeError object at 0x890d88c>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.TypeError object at 0x890d88c>
    __hash__ = <method-wrapper '__hash__' of exceptions.TypeError object at 0x890d88c>
    __init__ = <method-wrapper '__init__' of exceptions.TypeError object at 0x890d88c>
    __new__ = <built-in method __new__ of type object at 0x8141b40>
    __reduce__ = <built-in method __reduce__ of exceptions.TypeError object at 0x890d88c>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.TypeError object at 0x890d88c>
    __repr__ = <method-wrapper '__repr__' of exceptions.TypeError object at 0x890d88c>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.TypeError object at 0x890d88c>
    __setstate__ = <built-in method __setstate__ of exceptions.TypeError object at 0x890d88c>
    __str__ = <method-wrapper '__str__' of exceptions.TypeError object at 0x890d88c>
    args = ('string indices must be integers',)
    message = 'string indices must be integers'

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/share/umit/umitGUI/MainWindow.py", line 678, in _load_scan_results_cb
    self._load(filename=self._results_filechooser_dialog.get_filename())
  File "/usr/share/umit/umitGUI/MainWindow.py", line 729, in _load
    scan_page.parse_result(f)
  File "/usr/share/umit/umitGUI/ScanNotebook.py", line 657, in parse_result
    self._parse(file_to_parse=file_to_parse)
  File "/usr/share/umit/umitGUI/ScanNotebook.py", line 809, in _parse
    annotation=self.parsed.profile_annotation)
  File "/usr/share/umit/umitCore/UmitConf.py", line 220, in add_profile
    if options[opt]:
TypeError: string indices must be integers


Change History

Changed 5 years ago by luis

  • description modified (diff)
  • milestone changed from Umit 0.9.5 to Umit 1.0-ALPHA

Changed 5 years ago by luis

  • owner changed from boltrix to zero

Changed 4 years ago by gpolo

  • milestone changed from Umit 1.0beta1 to Umit 1.0

Changed 4 years ago by gpolo

Ok, to reproduce this one has to:

run a scan, save the scan as an .usr file, delete the profile used by the scan, load the saved scan

Changed 4 years ago by gpolo

  • status changed from new to closed
  • resolution set to fixed

Fixed in r4152, thanks crash reporter :)

Note: See TracTickets for help on using tickets.