neo-nie / pynsource

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

Crash when importing if you first import a file containing no classes #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. File/import python code hexagon1.py
2. File/import any other file e.g. hexpersistence.py

What is the expected output? What do you see instead?

Expect hexpersistence.py to be parsed and rendered in uml correctly.
Instead we get a crash.

NOTE: If you restart the app and import hexpersistence.py first, there are no 
problems.

Its as if importing hexagon1.py "corrupts" the app.  Possibly because it 
contains no classes? (just has functions etc).

Original issue reported on code.google.com by abu...@gmail.com on 15 Jul 2012 at 1:44

Attachments:

GoogleCodeExporter commented 8 years ago
Error is:

Importing...
[u'F:\\Devel\\pyNsource\\trunk\\Research\\hexmvc\\hexagon3\\hexpersistence.py']
Draw: stage1
Traceback (most recent call last):
  File "pynsourcegui.py", line 442, in FileImport
    self.umlwin.Go(files=filenames)
  File "F:\Devel\pyNsource\trunk\src\gui\uml_canvas.py", line 449, in Go
    self.stage1()
  File "F:\Devel\pyNsource\trunk\src\gui\uml_canvas.py", line 685, in stage1
    self.AllToWorldCoords()
  File "F:\Devel\pyNsource\trunk\src\gui\uml_canvas.py", line 75, in AllToWorldCoords
    self.coordmapper.AllToWorldCoords()
  File "F:\Devel\pyNsource\trunk\src\layout\coordinate_mapper.py", line 137, in AllToWorldCoords
    node.left, node.top = self.LayoutToWorld([node.layoutPosX, node.layoutPosY])
  File "F:\Devel\pyNsource\trunk\src\layout\coordinate_mapper.py", line 100, in LayoutToWorld
    int((point[0] - self.graph.layoutMinX) * self.factorX + self.radius),
ValueError: cannot convert float NaN to integer

Original comment by abu...@gmail.com on 15 Jul 2012 at 1:45

GoogleCodeExporter commented 8 years ago

Original comment by abu...@gmail.com on 15 Jul 2012 at 2:17

GoogleCodeExporter commented 8 years ago
Confirmed - just file/new, file/import "asciiworkspace_test01.py" and nothing 
is imported because there are no classes.  Then import any other decent python 
file and BOOM get the same crash.

Original comment by abu...@gmail.com on 19 Jul 2012 at 2:12

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by abu...@gmail.com on 19 Jul 2012 at 2:19

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r525.

Original comment by abu...@gmail.com on 19 Aug 2012 at 8:53