Git Product home page Git Product logo

Comments (7)

joouha avatar joouha commented on May 25, 2024

Pillow is required to determine the dimensions of images for image rendering.

The others are not supposed to be installed by default - they are pulled in by img2unicode, which I meant to make an optional dependency, but I messed up my pyproject.toml file!

from euporie.

zygm0nt avatar zygm0nt commented on May 25, 2024

So, a follow up question - why n2 dependency? What does ANN search has to do with viewing jupyter notebooks?

Also main reason behind this question is that I can't install n2 on Mac OS X - have problems compiling it.

from euporie.

bjodah avatar bjodah commented on May 25, 2024

Not sure if this error belongs here, but maybe a markdown lexer might be needed too?

    raise ClassNotFound('no lexer for alias %r found' % _alias)

Exception no lexer for alias 'markdown' found

Unhandled exception in event loop:
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/eventloop/utils.py", line 72, in schedule
    func()
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 480, in redraw
    self._redraw()
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 552, in _redraw
    self.context.copy().run(run_in_context)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 535, in run_in_context
    self.renderer.render(self, self.layout)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/renderer.py", line 672, in render
    layout.container.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 809, in write_to_screen
    self.content.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 809, in write_to_screen
    self.content.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 399, in write_to_screen
    c.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 399, in write_to_screen
    c.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 716, in write_to_screen
    c.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 399, in write_to_screen
    c.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 716, in write_to_screen
    c.write_to_screen(
  File "/home/bjorn/.local/lib/python3.8/site-packages/euporie/scroll.py", line 116, in write_to_screen
    self.to_draw = self.arrange_children(write_position)
  File "/home/bjorn/.local/lib/python3.8/site-packages/euporie/scroll.py", line 414, in arrange_children
    size = self.get_child_size(i, refresh=True)
  File "/home/bjorn/.local/lib/python3.8/site-packages/euporie/scroll.py", line 380, in get_child_size
    size = container.preferred_height(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 795, in preferred_height
    return self.content.preferred_height(width, max_available_height)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 325, in preferred_height
    dimensions = [
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 326, in 
    c.preferred_height(width, max_available_height) for c in self._all_children
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 2625, in preferred_height
    return self.content.preferred_height(width, max_available_height)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 577, in preferred_height
    dimensions = [
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 578, in 
    c.preferred_height(s, max_available_height)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 325, in preferred_height
    dimensions = [
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 326, in 
    c.preferred_height(width, max_available_height) for c in self._all_children
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1623, in preferred_height
    return self._merge_dimensions(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1651, in _merge_dimensions
    preferred = get_preferred()
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1616, in preferred_content_height
    return self.content.preferred_height(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 647, in preferred_height
    content = self.create_content(width, height=1)  # Pass a dummy '1' as height.
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 779, in create_content
    get_processed_line = self._create_get_processed_line_func(
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 730, in _create_get_processed_line_func
    return create_func()
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 717, in create_func
    get_line = self._get_formatted_text_for_line_func(document)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 678, in _get_formatted_text_for_line_func
    return self._fragment_cache.get(key, get_formatted_text_for_line)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/cache.py", line 41, in get
    value = getter_func()
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 675, in get_formatted_text_for_line
    return self.lexer.lex_document(document)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/lexers/base.py", line 78, in lex_document
    return lexer.lex_document(document)
  File "/home/bjorn/.local/lib/python3.8/site-packages/prompt_toolkit/lexers/base.py", line 77, in lex_document
    lexer = self.get_lexer() or self._dummy
  File "/home/bjorn/.local/lib/python3.8/site-packages/euporie/cell.py", line 235, in 
    get_lexer_by_name(self.language).__class__,
  File "/home/bjorn/.local/lib/python3.8/site-packages/pygments/lexers/__init__.py", line 119, in get_lexer_by_name
    raise ClassNotFound('no lexer for alias %r found' % _alias)

Exception no lexer for alias 'markdown' found
Press ENTER to continue...

from euporie.

joouha avatar joouha commented on May 25, 2024

@zygm0nt img2unicode was supposed to be an optional dependency - it brings in a lot of things which euporie does not actaully require (including n2).

I've fixed this in master, but was wanted to resolve #2 before creating a new release to prevent euporie potentially breaking other tools which depend on jupyter-client.

@bjodah Which version of pygments do you have installed? pygments==2.9.0 has 'markdown' as an alias for MarkdownLexar (see here), so I wonder if you have an old version...?

from euporie.

bjodah avatar bjodah commented on May 25, 2024

I did. I had 2.7.x (can't remember) manually upgrading pygments seem to have solved the issue. Thanks.

from euporie.

joouha avatar joouha commented on May 25, 2024

The original issue is fixed by 5dad165, and the fix is in the v0.1.4 release

from euporie.

simurgh9 avatar simurgh9 commented on May 25, 2024

I was also getting a ClassNotFound: no lexer for alias 'markdown' found when I tried to edit a markdown cell. Had to run the pip3 install pygments -U to solve the issue.

from euporie.

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.