Responding to my own post as I have narrowed down the issue to this table 
definition that I believe breaks the graph model.


db.define_table("employee_comments",
    Field("employee", "reference employee", requires=IS_IN_DB(db, 
'employee.id', '%(profile_statement)s'), readable=False, writable=False),
    Field("parent_id", "reference employee_comments",   readable=False, 
writable=False),
    Field("body", "text", label='', notnull=True, requires=IS_NOT_EMPTY()),
    auth.signature)


And particularly due this field definition.

    Field("parent_id", "reference employee_comments",   readable=False, 
writable=False),

In other words, if I reference the parent id to its own, then the graph 
model breaks with the error given above. Not sure its a bug but I thought I 
should at least document the finding.






On Wednesday, August 3, 2016 at 12:03:07 PM UTC-4, Ron Chatterjee wrote:
>
> Guys,  any one ran into an issue of running Graph model of web2py in 
> windows? Wondering if others will try the instruction below and see if they 
> can replicate the same problem. 
>
> I get the following error:
>
> ....r\lib\site-packages\pygraphviz\agraph.py", line 481, in add_edge
>     eh = gv.agedge(self.handle, uh, vh, key, _Action.find)
> KeyError: 'agedge: no key'
>
> *Steps I have taken to install the packages are following (Thank you 
> Leonel):*
>
>
>  
>
> 1. Install graphviz from here 
> http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi
>
> 2. Downloaded wheel source from https://pypi.python.org/pypi/wheel
>
> 3. Unpacked the zip and got a folder C:\Usersl\Desktop\wheel-0.29.0
>
> 4. In a command line:
>
>        4.1 cd C:\Users\Desktop\wheel-0.29.0
>
>        4.2 python setup.py install
>
> 5. Step 4 made an installer for me that is now 
> in C:\Users\Desktop\wheel-0.24.0\dist
>
> 6. Having wheel installed download the right version wheel of pygraphviz 
> (pygraphviz-1.3.1-cp27-none-win_amd64.whl for me) from here 
> http://www.lfd.uci.edu/~gohlke/pythonlibs/ 
> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygraphviz> (I was able to 
> install and when I do import pygraphviz  it doesn't complain)
>
> 7. With a command line In the directory where the whl file is "pip install 
> 1.3.1-cp27-none-win_amd64.whl "
>
> 8. Add C:\Program Files (x86)\Graphviz2.38\bin to the environment PATH
>
> 9. Restart web2py, if you ran web2py from a command line, make sure to 
> start it in a new one which has PATH updated.
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to