den-run-ai / yapgvb

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

Digraph construction will occasionally throw an exception. #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. from yapgvb import Digraph
2. Digraph('Tree')
3. Exception:

Traceback (most recent call last):
  File "/home/user/test.py", line 5, in __init__
    graph = Digraph('Tree')
  File "/usr/lib/python2.6/dist-packages/yapgvb/__init__.py", line 520, in
__init__
    if isinstance(arg, file):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
and types

Note that I intentionally modified the logs to hide my setup; I really
don't have a user called "user".

What version of the product are you using? On what operating system?

This one: yapgvb_1.2.3-0ubuntu1
http://packages.ubuntu.com/uk/karmic/python-yapgvb

This is a strange exception because it shows up the first time you run the
file (without a pyc around) and then no time after.

I tried importing yapgvb and using yapgvb.Digraph and the error seems to go
away. My guess is that the file resource (from the exception) gets loaded
when you import yapgvb but not just Digraph.

Original issue reported on code.google.com by thereisn...@gmail.com on 1 Apr 2010 at 5:04