Bug 744588 - Multiple AttributeError: 'NoneType' object has no attribute 'obj_dict' when running python-pebl
Summary: Multiple AttributeError: 'NoneType' object has no attribute 'obj_dict' when r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pydot
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: python-pebl
TreeView+ depends on / blocked
 
Reported: 2011-10-09 16:16 UTC by Thomas Spura
Modified: 2011-10-25 03:22 UTC (History)
2 users (show)

Fixed In Version: pydot-1.0.25-2.fc16
Clone Of:
Environment:
Last Closed: 2011-10-22 08:24:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
seems to fix the described problem (1.12 KB, patch)
2011-10-09 16:16 UTC, Thomas Spura
no flags Details | Diff

Description Thomas Spura 2011-10-09 16:16:04 UTC
Created attachment 527103 [details]
seems to fix the described problem

Description of problem:
At reviewing python-pebl at bug #554464, I noted, that the tutorials at [1] aren't working:
$ pebl run tmp.cfg 
Traceback (most recent call last):
  File "/usr/bin/pebl", line 9, in <module>
    load_entry_point('pebl==1.0.2', 'console_scripts', 'pebl')()
  File "/usr/lib64/python2.7/site-packages/pebl/pebl_script.py", line 51, in main
    action()
  File "/usr/lib64/python2.7/site-packages/pebl/pebl_script.py", line 71, in run
    merged_result.tohtml()
  File "/usr/lib64/python2.7/site-packages/pebl/result.py", line 150, in tohtml
    outdir or config.get('result.outdir')
  File "/usr/lib64/python2.7/site-packages/pebl/result.py", line 211, in htmlreport
    top.layout()
  File "/usr/lib64/python2.7/site-packages/pebl/network.py", line 289, in layout
    self.node_positions = [[int(float(i)) for i in n.get_pos()[1:-1].split(',')] for n in nodes] 
  File "/usr/lib64/python2.7/site-packages/pebl/network.py", line 288, in <genexpr>
    nodes = (n for n in dotgraph.get_node_list() if n.get_pos())
  File "/usr/lib/python2.7/site-packages/pydot.py", line 685, in <lambda>
    self.__setattr__('get_'+attr, lambda a=attr : self.__get_attribute__(a))
  File "/usr/lib/python2.7/site-packages/pydot.py", line 611, in __get_attribute__
    attr_val = default.obj_dict['attributes'].get(attr, None)
AttributeError: 'NoneType' object has no attribute 'obj_dict'


(with cat tmp.cfg
[data]
filename = pebl-tutorial-data1.txt
discretize = 3

[learner]
type = greedy.GreedyLearner

[result]
format = html
outdir = example1-result

The attached patch makes it working (again). I didn't use python-pebl or pydot before, so better ask upstream if this is a real fix :)

[1] http://packages.python.org/pebl/tutorial.html

Version-Release number of selected component (if applicable):
pydot-1.0.25-1.fc15.noarch

Comment 1 Thomas Spura 2011-10-09 16:17:55 UTC
Another reproducer is, running the testsuite from python-pebl, see scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3416390

with build.log:
http://koji.fedoraproject.org/koji/getfile?taskID=3416391&name=build.log

e.g.:
======================================================================
ERROR: pebl.test.test_pebl_script.TestHtmlReport.test_htmlreport
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/test/test_pebl_script.py", line 32, in test_htmlreport
    pebl_script.run(os.path.join(self.tempdir, 'config.txt'))
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/pebl_script.py", line 71, in run
    merged_result.tohtml()
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/result.py", line 150, in tohtml
    outdir or config.get('result.outdir')
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/result.py", line 211, in htmlreport
    top.layout()
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/network.py", line 289, in layout
    self.node_positions = [[int(float(i)) for i in n.get_pos()[1:-1].split(',')] for n in nodes]
  File "/builddir/build/BUILD/pebl-1.0.2/src/pebl/network.py", line 288, in <genexpr>
    nodes = (n for n in dotgraph.get_node_list() if n.get_pos())
  File "/usr/lib/python2.7/site-packages/pydot.py", line 682, in <lambda>
    self.__setattr__('get_'+attr, lambda a=attr : self.__get_attribute__(a))
  File "/usr/lib/python2.7/site-packages/pydot.py", line 594, in __get_attribute__
    defaults = self.get_parent_graph().get_node( default_node_name )
AttributeError: 'NoneType' object has no attribute 'get_node'

Comment 2 Tom "spot" Callaway 2011-10-11 14:55:38 UTC
Filed upstream as http://code.google.com/p/pydot/issues/detail?id=60

Update for Fedora coming shortly.

Comment 3 Fedora Update System 2011-10-11 15:26:18 UTC
pydot-1.0.25-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/pydot-1.0.25-2.fc15

Comment 4 Fedora Update System 2011-10-11 15:26:27 UTC
pydot-1.0.25-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/pydot-1.0.25-2.fc14

Comment 5 Fedora Update System 2011-10-11 15:26:35 UTC
pydot-1.0.25-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/pydot-1.0.25-2.fc16

Comment 6 Fedora Update System 2011-10-13 00:47:37 UTC
Package pydot-1.0.25-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pydot-1.0.25-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14178
then log in and leave karma (feedback).

Comment 7 Tadej Janež 2011-10-15 09:48:35 UTC
As noted in the comment to https://admin.fedoraproject.org/updates/FEDORA-2011-14178, this update fixes the mentioned problems.

Tom, would you be so kind to request the buildroot overrides for pydot-1.0.25-2.fc15 and pydot-1.0.25-2.fc16?
(I tried doing it myself, but bodhi returned an error: "Error: You do not have commit privileges to pydot")

Comment 8 Tom "spot" Callaway 2011-10-17 14:42:39 UTC
Overrides are now in place, until 2011-10-19.

Comment 9 Fedora Update System 2011-10-22 08:24:52 UTC
pydot-1.0.25-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-10-22 08:29:05 UTC
pydot-1.0.25-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2011-10-25 03:22:41 UTC
pydot-1.0.25-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.