Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unhashable type: 'dict' #4479

Closed
synctext opened this issue May 2, 2019 · 3 comments

Comments

@synctext
Copy link
Member

commented May 2, 2019

When running latest Beta2 of 7.3 on Ubuntu and visiting the new 'trust graph' with empty megacache:

ERROR   1556800842.19              rest_manager:80   (RESTRequest)  [Failure instance: Traceback: <type 'exceptions.TypeError'>: unhashable type: 'dict'
/usr/lib/python2.7/dist-packages/twisted/web/http.py:2013:lineReceived
/usr/lib/python2.7/dist-packages/twisted/web/http.py:2104:allContentReceived
/usr/lib/python2.7/dist-packages/twisted/web/http.py:866:requestReceived
/usr/share/tribler/Tribler/Core/Modules/restapi/rest_manager.py:114:process
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/web/server.py:195:process
/usr/lib/python2.7/dist-packages/twisted/web/server.py:255:render
/usr/lib/python2.7/dist-packages/twisted/web/resource.py:250:render
/usr/share/tribler/Tribler/Core/Modules/restapi/trustview_endpoint.py:68:render_GET
/usr/share/tribler/Tribler/Core/Modules/restapi/trustview_endpoint.py:35:initialize_graph
/usr/share/tribler/Tribler/Core/Modules/TrustCalculation/local_view.py:29:__init__
/usr/share/tribler/Tribler/Core/Modules/TrustCalculation/local_view.py:78:lay_down_nodes
/usr/lib/python2.7/dist-packages/networkx/classes/function.py:333:set_node_attributes
]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 195, in process
    self.render(resrc)
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 255, in render
    body = resrc.render(self)
  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/usr/share/tribler/Tribler/Core/Modules/restapi/trustview_endpoint.py", line 68, in render_GET
    self.initialize_graph()
  File "/usr/share/tribler/Tribler/Core/Modules/restapi/trustview_endpoint.py", line 35, in initialize_graph
    self.local_view = NodeVision(self.node_id)
  File "/usr/share/tribler/Tribler/Core/Modules/TrustCalculation/local_view.py", line 29, in __init__
    self.pos = self.lay_down_nodes()
  File "/usr/share/tribler/Tribler/Core/Modules/TrustCalculation/local_view.py", line 78, in lay_down_nodes
    nx.set_node_attributes(self.graph, new_pos, 'pos')
  File "/usr/lib/python2.7/dist-packages/networkx/classes/function.py", line 333, in set_node_attributes
    G.node[node][name] = value
TypeError: unhashable type: 'dict'

@synctext synctext added this to the V7.3: Gigachannels milestone May 2, 2019

@qstokkink qstokkink added the bug label May 2, 2019

@synctext

This comment has been minimized.

Copy link
Member Author

commented May 2, 2019

On Ubuntu this can be fixed by doing:
pip install --upgrade networkx

@synctext synctext closed this May 2, 2019

@devos50

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

So we cannot rely on the networkx package provided by apt-get? If so, we should update our debian.control file accordingly and install networkx from pip in our post-install script.

@qstokkink

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

We should close this once we updated our debian/control and debian/tribler.postinst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.