Ticket #80 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

Error in adapters/connectors.py causes Gaphor to crash while loading a file

Reported by: pleaseban..@gmail.com Assigned to: arj..@yirdis.nl
Priority: major Milestone:
Component: Gaphor Version:
Keywords: Cc:

Description

Gaphor crash output when loading a UML case diagram:

2007-09-17 07:40:22,196 DEBUG Loading from: /home/scott/Documents/ass1.gaphor
2007-09-17 07:40:22,243 INFO Loading file ass1.gaphor
2007-09-17 07:40:22,625 INFO Read 217 elements from file
2007-09-17 07:40:22,625 DEBUG Loading 217 elements...
2007-09-17 07:40:24,456 INFO file /home/scott/Documents/ass1.gaphor could not be loaded
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/storage.py", line 338, in load_generator
    for percentage in load_elements_generator(elements, factory, gaphor_version):
  File "/usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/storage.py", line 289, in load_elements_generator
    elem.element.postload()
  File "/usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/diagram/diagramline.py", line 123, in postload
    adapter.connect(self.tail)
  File "/usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/adapters/connectors.py", line 500, in connect
    self.connect_subject(handle)
  File "/usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/adapters/connectors.py", line 736, in connect_subject
    line.subject = relation
NameError: global name 'line' is not defined
2007-09-17 07:40:25,013 ERROR Error while loading model from file /home/scott/Documents/ass1.gaphor: <type 'exceptions.NameError'>
> /usr/lib/python2.5/site-packages/gaphor-0.12.2-py2.5.egg/gaphor/adapters/connectors.py(736)connect_subject()
-> line.subject = relation
(Pdb) 

The problem was fixed for me by changing line 736 of trunk/gaphor/adapters/connectors.py from

line.subject = relation

to

self.line.subject = relation

Attachments

Change History

09/17/07 11:40:34 changed by wrobe..@pld-linux.org

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

fixed as suggested on trunk and branch gaphor-0.12 (changesets [2126], [2127]). thx.


Add/Change #80 (Error in adapters/connectors.py causes Gaphor to crash while loading a file)




Action