MannLabs / alphamap

An open-source Python package for the visual annotation of proteomics data with sequence specific knowledge.
https://mannlabs.github.io/alphamap/
Apache License 2.0
76 stars 18 forks source link

pygments.util.ClassNotFound: no lexer for alias None found #21

Closed fcyu closed 3 years ago

fcyu commented 3 years ago

Hi developers,

I am using the latest windows installer (https://github.com/MannLabs/alphamap/releases/tag/v0.0.210730-alpha). My computer has an older version, I didn't uninstall it before installing the new one. Not sure if it makes any difference.

Following is the whole error message

******************************
******* AlphaMap 0.0.8 *******
******************************
Launching server at http://localhost:51189
ERROR:tornado.application:Uncaught exception GET / (::1)
HTTPServerRequest(protocol='http', host='localhost:51189', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "markdown\extensions\codehilite.py", line 133, in hilite
    lexer = get_lexer_by_name(self.lang, **self.options)
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\pygments\lexers\__init__.py", line 106, in get_lexer_by_name
    raise ClassNotFound('no lexer for alias %r found' % _alias)
pygments.util.ClassNotFound: no lexer for alias None found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tornado\web.py", line 1704, in _execute
    result = await result
  File "bokeh\server\views\doc_handler.py", line 52, in get
    session = await self.get_session()
  File "bokeh\server\views\session_handler.py", line 120, in get_session
    session = await self.application_context.create_session_if_needed(session_id, self.request, token)
  File "bokeh\server\contexts.py", line 218, in create_session_if_needed
    self._application.initialize_document(doc)
  File "bokeh\application\application.py", line 171, in initialize_document
    h.modify_document(doc)
  File "bokeh\application\handlers\function.py", line 132, in modify_document
    self._func(doc)
  File "panel\io\server.py", line 91, in _eval_panel
    doc = as_panel(panel)._modify_doc(server_id, title, doc, location)
  File "panel\viewable.py", line 230, in _modify_doc
    return self.server_doc(doc, title, location)
  File "panel\viewable.py", line 749, in server_doc
    model = self.get_root(doc)
  File "panel\viewable.py", line 482, in get_root
    root = self._get_model(doc, comm=comm)
  File "panel\layout\base.py", line 112, in _get_model
    objects = self._get_objects(model, [], doc, root, comm)
  File "panel\layout\base.py", line 102, in _get_objects
    child = pane._get_model(doc, root, model, comm)
  File "panel\layout\base.py", line 112, in _get_model
    objects = self._get_objects(model, [], doc, root, comm)
  File "panel\layout\base.py", line 102, in _get_objects
    child = pane._get_model(doc, root, model, comm)
  File "panel\layout\base.py", line 112, in _get_model
    objects = self._get_objects(model, [], doc, root, comm)
  File "panel\layout\base.py", line 102, in _get_objects
    child = pane._get_model(doc, root, model, comm)
  File "panel\layout\base.py", line 112, in _get_model
    objects = self._get_objects(model, [], doc, root, comm)
  File "panel\layout\base.py", line 102, in _get_objects
    child = pane._get_model(doc, root, model, comm)
  File "panel\pane\markup.py", line 43, in _get_model
    model = self._bokeh_model(**self._get_properties())
  File "panel\pane\markup.py", line 295, in _get_properties
    html = markdown.markdown(data, extensions=self.extensions,
  File "markdown\core.py", line 387, in markdown
    return md.convert(text)
  File "markdown\core.py", line 268, in convert
    newRoot = treeprocessor.run(root)
  File "markdown\extensions\codehilite.py", line 246, in run
    placeholder = self.md.htmlStash.store(code.hilite())
  File "markdown\extensions\codehilite.py", line 137, in hilite
    lexer = guess_lexer(self.src, **self.options)
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\pygments\lexers\__init__.py", line 311, in guess_lexer
    for lexer in _iter_lexerclasses():
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\pygments\lexers\__init__.py", line 237, in _iter_lexerclasses
    yield from find_plugin_lexers()
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\pygments\plugin.py", line 54, in find_plugin_lexers
    yield entrypoint.load()
  File "pkg_resources\__init__.py", line 2450, in load
  File "pkg_resources\__init__.py", line 2456, in resolve
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\IPython\__init__.py", line 56, in <module>
    from .terminal.embed import embed
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\IPython\terminal\embed.py", line 14, in <module>
    from IPython.core.magic import Magics, magics_class, line_magic
  File "C:\Users\yufe\AppData\Local\Programs\AlphaMap\IPython\core\magic.py", line 23, in <module>
    from decorator import decorator
ModuleNotFoundError: No module named 'decorator'
ERROR:tornado.access:500 GET / (::1) 986.46ms
WARNING:tornado.access:404 GET /favicon.ico (::1) 1.00ms

Thanks,

Fengchao

ibludau commented 3 years ago

Dear Fengchao, Thanks for your message - we will look into this and get back to you. Could you please let us know which windows version you're working on? Best, Isabell

fcyu commented 3 years ago

Hi Isabell,

It's Windows 10 Enterprise, version 1909, build 18363.1679.

Best,

Fengchao

fcyu commented 3 years ago

An update: uninstall the old AlphaMap will solve this issue. I guess the new installer does not update some old files.

Best,

Fengchao

ibludau commented 3 years ago

Ok that is good to know - thanks for checking this! @swillems: Could you take a look if this issue is easy to fix in the installer?

swillems commented 3 years ago

For macOS this should be correctly enforced already. Our tagging is inconsistent with our versioning (e.g. tags are date-based: v0.0.210730-alpha, while versions are traditional: 0.0.8), although I do not think this is the issue for our InnoInstaller setup. We for sure should fix the AppId in the InnoInstaller script, as this seems to be copy-pasted from AlphaTims directly which can cause conflicts if both are installed. I have seen @fcyu on the AlphaTims repo already too, perhaps good to clarify when and which versions of both AlphaMap and AlphaTims were installed and in which order before we try to dig deeper?

fcyu commented 3 years ago

Hi @swillems ,

Thanks for your message. My computer did not have AlphaTims installed when I was installing and running AlphaPept.

Best,

Fengchao

EugeniaVoytik commented 3 years ago

Thanks for submitting this issue! We've added a warning "To prevent installation errors on Windows, we recommend uninstalling the previous AlphaMap version before installing a new one." in the gui_manual.pdf file and in the README.md file.