sphinx-contrib / spelling

A spelling checker for Sphinx-based documentation
https://sphinxcontrib-spelling.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
82 stars 41 forks source link

sphinx failing with sphinxcontrib.spelling 6.0.0 #95

Closed alex closed 3 years ago

alex commented 3 years ago

Seen here: https://travis-ci.com/github/pyca/cryptography/jobs/401809478

Relevant bits of the log:

docs run-test: commands[3] | sphinx-build -T -W -b spelling docs docs/_build/html
Running Sphinx v3.2.1
Initializing Spelling Checker 6.0.0
Ignoring wiki words
Ignoring acronyms
Ignoring Python builtins
Ignoring importable module names
Ignoring contributor names
Looking for custom word list in /home/travis/build/pyca/cryptography/docs/spelling_wordlist.txt
Scanning contributors
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [spelling]: all documents
updating environment: [new config] 59 added, 0 changed, 0 removed
reading sources... [  1%] api-stability
reading sources... [  3%] changelog
reading sources... [  5%] community
reading sources... [  6%] development/c-bindings
reading sources... [  8%] development/custom-vectors/arc4
reading sources... [ 10%] development/custom-vectors/cast5
reading sources... [ 11%] development/custom-vectors/hkdf
reading sources... [ 13%] development/custom-vectors/idea
reading sources... [ 15%] development/custom-vectors/rsa-oaep-sha2
reading sources... [ 16%] development/custom-vectors/secp256k1
reading sources... [ 18%] development/custom-vectors/seed
reading sources... [ 20%] development/getting-started
reading sources... [ 22%] development/index
reading sources... [ 23%] development/reviewing-patches
reading sources... [ 25%] development/submitting-patches
reading sources... [ 27%] development/test-vectors
reading sources... [ 28%] doing-a-release
reading sources... [ 30%] exceptions
reading sources... [ 32%] faq
reading sources... [ 33%] fernet
reading sources... [ 35%] glossary
reading sources... [ 37%] hazmat/backends/index
reading sources... [ 38%] hazmat/backends/interfaces
reading sources... [ 40%] hazmat/backends/openssl
reading sources... [ 42%] hazmat/primitives/aead
reading sources... [ 44%] hazmat/primitives/asymmetric/dh
reading sources... [ 45%] hazmat/primitives/asymmetric/dsa
reading sources... [ 47%] hazmat/primitives/asymmetric/ec
reading sources... [ 49%] hazmat/primitives/asymmetric/ed25519
reading sources... [ 50%] hazmat/primitives/asymmetric/ed448
reading sources... [ 52%] hazmat/primitives/asymmetric/index
reading sources... [ 54%] hazmat/primitives/asymmetric/rsa
reading sources... [ 55%] hazmat/primitives/asymmetric/serialization
reading sources... [ 57%] hazmat/primitives/asymmetric/utils
reading sources... [ 59%] hazmat/primitives/asymmetric/x25519
reading sources... [ 61%] hazmat/primitives/asymmetric/x448
reading sources... [ 62%] hazmat/primitives/constant-time
reading sources... [ 64%] hazmat/primitives/cryptographic-hashes
reading sources... [ 66%] hazmat/primitives/index
reading sources... [ 67%] hazmat/primitives/key-derivation-functions
reading sources... [ 69%] hazmat/primitives/keywrap
reading sources... [ 71%] hazmat/primitives/mac/cmac
reading sources... [ 72%] hazmat/primitives/mac/hmac
reading sources... [ 74%] hazmat/primitives/mac/index
reading sources... [ 76%] hazmat/primitives/mac/poly1305
reading sources... [ 77%] hazmat/primitives/padding
reading sources... [ 79%] hazmat/primitives/smime
reading sources... [ 81%] hazmat/primitives/symmetric-encryption
reading sources... [ 83%] hazmat/primitives/twofactor
reading sources... [ 84%] index
reading sources... [ 86%] installation
reading sources... [ 88%] limitations
reading sources... [ 89%] random-numbers
reading sources... [ 91%] security
reading sources... [ 93%] x509/certificate-transparency
reading sources... [ 94%] x509/index
reading sources... [ 96%] x509/ocsp
reading sources... [ 98%] x509/reference
reading sources... [100%] x509/tutorial
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  1%] api-stability
writing output... [  3%] changelog
writing output... [  5%] community
writing output... [  6%] development/c-bindings
Traceback (most recent call last):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 423, in next
    (word, pos) = next(self._curtok)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 141, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 247, in next
    raise StopIteration()
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 423, in next
    (word, pos) = next(self._curtok)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 141, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 247, in next
    raise StopIteration()
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 423, in next
    (word, pos) = next(self._curtok)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 141, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 247, in next
    raise StopIteration()
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/application.py", line 348, in build
    self.builder.build_update()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 294, in build_update
    self.build(['__all__'], to_build)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 361, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 535, in write
    self._write_serial(sorted(docnames))
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 545, in _write_serial
    self.write_doc(docname, doctree)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinxcontrib/spelling/builder.py", line 169, in write_doc
    lines = list(self._find_misspellings(docname, doctree))
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinxcontrib/spelling/builder.py", line 215, in _find_misspellings
    for word, suggestions, context_line in misspellings:
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinxcontrib/spelling/checker.py", line 54, in check
    for word, pos in self.tokenizer(text):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 416, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 426, in next
    (word, pos) = next(self._tokenizer)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 416, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 426, in next
    (word, pos) = next(self._tokenizer)
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 416, in __next__
    return self.next()
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/enchant/tokenize/__init__.py", line 427, in next
    while self._skip(self._to_string(word)):
  File "/home/travis/build/pyca/cryptography/.tox/docs/lib/python3.8/site-packages/sphinxcontrib/spelling/filters.py", line 192, in _skip
    spec = importlib.util.find_spec(word)
  File "/opt/python/3.8.3/lib/python3.8/importlib/util.py", line 90, in find_spec
    fullname = resolve_name(name, package) if name.startswith('.') else name
  File "/opt/python/3.8.3/lib/python3.8/importlib/util.py", line 32, in resolve_name
    raise ValueError(f'no package specified for {repr(name)} '
ValueError: no package specified for '...unless' (required for relative module names)
Exception occurred:
  File "/opt/python/3.8.3/lib/python3.8/importlib/util.py", line 32, in resolve_name
    raise ValueError(f'no package specified for {repr(name)} '
ValueError: no package specified for '...unless' (required for relative module names)
felixxm commented 3 years ago

We have the same issue in Django:

Exception occurred:
  File "/usr/lib/python3.6/importlib/util.py", line 25, in resolve_name
    raise ValueError(f'no package specified for {repr(name)} '
ValueError: no package specified for '...and' (required for relative module names)
dhellmann commented 3 years ago

Release 7.0.0 includes a fix for this issue from PR #97

Can you confirm that the fix solves the problems you're seeing?

alex commented 3 years ago

Confirmed

dhellmann commented 3 years ago

Thanks, @alex. I'll close this issue then.

felixxm commented 3 years ago

It works for us, Thanks :rocket: