question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MacOS standalone not working due to pygments error

See original GitHub issue

Seems like although the action building and testing the MacOS installer passes there is an error with the generated app. Looking the action log you can see a traceback related with pygments (from action execution: https://github.com/spyder-ide/spyder/runs/8079765883?check_suite_focus=true#step:11:17):

Run ./test_app.sh -t 60 -d 10 ${DISTDIR}
Traceback (most recent call last):
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/__boot__.py", line 251, in <module>
    _run()
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/__boot__.py", line 174, in _run
    exec(compile(source, path, "exec"), globals(), globals())
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/spyder", line 3, in <module>
    start.main()
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/app/start.py", line 128, in main
    from spyder.config.manager import CONF
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/config/manager.py", line 22, in <module>
    from spyder.config.main import CONF_VERSION, DEFAULTS, NAME_MAP
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/config/main.py", line 21, in <module>
    from spyder.config.appearance import APPEARANCE
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/config/appearance.py", line 15, in <module>
    from spyder.plugins.help.utils.sphinxify import CSS_PATH
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/help/utils/sphinxify.py", line 36, in <module>
    from sphinx.application import Sphinx
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/sphinx/application.py", line 32, in <module>
    from sphinx.highlighting import lexer_classes
  File "/Users/runner/work/spyder/spyder/dist/Spyder.app/Contents/Resources/lib/python3.9/sphinx/highlighting.py", line 12, in <module>
    from pygments.formatters import HtmlFormatter, LatexFormatter
  File "pygments/formatters/__init__.pyc", line 132, in __getattr__
  File "pygments/formatters/__init__.pyc", line 28, in _load_formatters
ModuleNotFoundError: No module named 'pygments.formatters.latex'
2022-08-29 21:14:56.679 Spyder[36541:97505] Launch error
2022-08-29 21:14:56.680 Spyder[36541:97505] Launch error
See the py2app website for debugging launch issues

Spyder launched successfully!
Shutting down Spyder...

./test_app.sh: line 72: 36541 Terminated: 15          $1/Spyder.app/Contents/MacOS/Spyder

Spyder shut down successfully in 0s

And when launching the installed app you see an error dialog from py2app (I checked this using MacOS 11.6.8 Big Sur):

imagen

Checking seems like pygments released version 2.13.0 a couple of weeks ago and PRs which GitHub actions checks runs are older than two weeks ago seem like where able to properly pass the MacOS installer validation test. Could then the new pygments release be the cause of the issue?

What do you think @mrclary ?

Also, I think someone reported something similar on the google group, right @ccordoba12 ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
mrclarycommented, Aug 30, 2022

So it was definitely py2app not capturing all the components of the package. The quick fix is to force py2app to include the entire package. I’ll upload new artifacts shortly.

The long-term fix for this would be to submit a PR for a pygments recipe for py2app. However, given the imminent conda-based installer, I’ll forgo that and just submit a PR here for this patch.

2reactions
mrclarycommented, Aug 30, 2022

@mrclary, could you take care of this?

If there is not a problem with the Windows or conda installs, then I hesitate to restrict the pygments version because it may be that only the macOS installer (py2app) didn’t capture pygments.formatters.latex.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I fix things when LaTex issues a package minted ...
First, Locate the folder where pygmentize is saved $ which pygmentize /Users/ggautier/anaconda/bin/pygmentize.
Read more >
Welcome! — Pygments
Welcome!¶. This is the home of Pygments. It is a generic syntax highlighter suitable for use in code hosting, forums, wikis or other...
Read more >
Solve printing problems on Mac - Apple Support
Try to print from another app. Try printing from another app, such as TextEdit. If the problem occurs only in one app, review...
Read more >
2019_Python_Release Notes Intel(R) Distribution for Python ...
The product supports Python 2 and 3 for Windows, Linux, and macOS. ... provides system requirements, installation instructions, and lists issues and.
Read more >
jupyterlab_pygments: Pygments theme using JupyterLab CSS ...
However, these system packages will not be used for building Sage because using Python site-packages is not supported by the Sage distribution; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found