Giter VIP home page Giter VIP logo

Comments (3)

austinkline avatar austinkline commented on May 20, 2024

Thanks for cutting this. There is a long history of communication on Jupyter and Gremlin about this issue

Gremlin discussions:
https://groups.google.com/g/gremlin-users/c/iT7o7XO0NOg/m/JibKl2ZyAAAJ?pli=1
https://groups.google.com/g/gremlin-users/c/9n36OxwhVhM/m/jOLOWdawBAAJ

Jupyter discussions
jupyter/notebook#3397

The issue preventing us from upgrading as I understand it, is that newer versions of tornado do not allow multiple event loops. Since Jupyter uses tornado, it creates an event loop when a kernel is made, so then when gremlin-python tries to also make one, it no longer can. Tornado throws an exception stating that multiple event loops cannot be made. This change was introduced in Tornado major version 5

This fix is unfortunately non-trivial, but in the meantime, there is a package that can be installed to help mitigate this issue. Please note, we have not tested or verified the stability of this workaround, so use at your own risk.

You can install the package nest-asyncio which can be used to patch tornado to allow nested loops.

# run this from a notebook cell
!pip install nest-asyncio
# run this after you install nest-asyncio
import nest_asyncio
nest_asyncio.apply()
# now you should be able to install whatever version of tornado you like
!pip install tornado==xxx

Hope this helps!

from graph-notebook.

krlawrence avatar krlawrence commented on May 20, 2024

Adding a note that as of Apache TinkerPop 3.5.0, the Gremlin Python client no longer uses Tornado. AIO HTTP is used instead. Once graph-notebook moves up to that TinkerPop level the Tornado issues should be resolved as graph-notebook will no longer have any Tornado dependencies.

from graph-notebook.

michaelnchin avatar michaelnchin commented on May 20, 2024

Hi @jeffmaley, just checking in in case you are still following this.

As of Release 3.0.7, setup requirements have been updated to remove the old pinned Tornado version, and upgrade to notebook>=6.1.5. This will pull in the Tornado 6.x child dependency by default.

Closing as the ask is resolved, please feel free to re-open if you have any further questions or concerns.

from graph-notebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.