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

New 'mistune' thrown no attribute 'BlockGrammar' #42

Closed
sebek98 opened this issue Dec 6, 2021 · 1 comment · Fixed by #43
Closed

New 'mistune' thrown no attribute 'BlockGrammar' #42

sebek98 opened this issue Dec 6, 2021 · 1 comment · Fixed by #43

Comments

@sebek98
Copy link

sebek98 commented Dec 6, 2021

Hi,

It looks like the new version on the 'mistune' (2.0.0 released Dec 5, 2021) package has different API and it throws AttributeError: module 'mistune' has no attribute 'BlockGrammar'
Previous version (0.8.4 released Oct 18, 2018) looks correct and works fine.

`

Running Sphinx v4.1.2

Exception occurred:
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/m2r2.py", line 83, in
class RestBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'
The full traceback has been saved in /tmp/sphinx-err-3daao_tt.log, if you want to report the issue to the developers.
`

Pipdeptree shows that this is a dependency of m2r2 package:

`

m2r2==0.3.1

  • docutils [required: Any, installed: 0.18.1]
  • mistune [required: Any, installed: 2.0.0]
    pipdeptree==2.2.0
  • pip [required: >=6.0.0, installed: 21.3.1]
    setuptools==58.3.0
    wheel==0.37.0
    `

Full sphinx log:
`

Sphinx version: 4.1.2
Python version: 3.9.5 (CPython)
Docutils version: 0.17.1 release
Jinja2 version: 3.0.3
Last messages:

Loaded extensions:
Traceback (most recent call last):
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/application.py", line 237, in init
self.setup_extension(extension)
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/application.py", line 393, in setup_extension
self.registry.load_extension(self, extname)
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/registry.py", line 429, in load_extension
mod = import_module(extname)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 855, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/m2r2.py", line 83, in
class RestBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'
`

@CrossNox
Copy link
Owner

Duplicate of #40

@CrossNox CrossNox marked this as a duplicate of #40 Dec 10, 2021
CrossNox pushed a commit that referenced this issue Dec 10, 2021
CrossNox added a commit that referenced this issue Dec 10, 2021
* force mistune to version 0.8.4 (#43)

closes #42 
closes #40

* pin

Co-authored-by: Ezequiel Rosas <nhtzr.rg@gmail.com>
CrossNox added a commit that referenced this issue Aug 11, 2022
* force mistune to version 0.8.4 (#43)

closes #42 
closes #40

* pin

* Remove calls to ErrorString and SafeString removed in docutils 0.19 (#49)

* remove python2

* fix pipelines

* fix linter pipeline

* set language for sphinx

* fix tests pipeline

* fix pipeline, set docutiles dependency

* why did I change this

* bump

Co-authored-by: Ezequiel Rosas <nhtzr.rg@gmail.com>
Co-authored-by: Ian Glen <ian@ianglen.me>
CrossNox added a commit that referenced this issue Jan 30, 2023
* force mistune to version 0.8.4 (#43)

closes #42 
closes #40

* pin

* Remove calls to ErrorString and SafeString removed in docutils 0.19 (#49)

* remove python2

* fix pipelines

* fix linter pipeline

* set language for sphinx

* fix tests pipeline

* fix pipeline, set docutiles dependency

* why did I change this

* bump

* Added python_requires to setup.py (#56)

* fix quotes

---------

Co-authored-by: Ezequiel Rosas <nhtzr.rg@gmail.com>
Co-authored-by: Ian Glen <ian@ianglen.me>
Co-authored-by: Martin Pecka <peci1@seznam.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants