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

Possibly bad path grammar #103

Closed
ocket8888 opened this issue Apr 2, 2019 · 1 comment
Closed

Possibly bad path grammar #103

ocket8888 opened this issue Apr 2, 2019 · 1 comment
Labels
typescript Having to do with sphinx-js's typescript support

Comments

@ocket8888
Copy link

Python v3.6.7
Sphinx v1.8.5
sphinx_js v2.7.1
typedoc v0.14.2 (using Typescript v3.2.4)

I ran into an error where parsimonious threw an exception trying to deal with some path (stack trace just named it as ../../../docs/app/ap) but by adding my own print statement in doclets.py I was able to find out it seemed to be having trouble with parsing files with . in the name. Here's the output with that path print included:

sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.8.5
WARNING: The config value `js_source_path' has type `list', defaults to `str'.
loading pickled environment... failed: No such config value: js_language

Using TypeScript 3.2.4 from /usr/lib/node_modules/typedoc/node_modules/typescript/lib

JSON written to /tmp/tmpttvvhqwa

parsing path: ../../../docs/app/app.component.external:app/app.component

Exception occurred:
  File "/usr/local/lib/python3.6/dist-packages/parsimonious/expressions.py", line 127, in match
    raise error
parsimonious.exceptions.ParseError: Rule 'path' didn't match at '../../../docs/app/ap' (line 1, column 1).
The full traceback has been saved in /tmp/sphinx-err-v8cgfoxe.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:71: recipe for target 'html' failed
make: *** [html] Error 2

... and here's the "full traceback" it talks about:

# Sphinx version: 1.8.5
# Python version: 3.6.7 (CPython)
# Docutils version: 0.14 
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/sphinx/cmd/build.py", line 303, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/usr/local/lib/python3.6/dist-packages/sphinx/application.py", line 263, in __init__
    self._init_builder()
  File "/usr/local/lib/python3.6/dist-packages/sphinx/application.py", line 325, in _init_builder
    self.emit('builder-inited')
  File "/usr/local/lib/python3.6/dist-packages/sphinx/application.py", line 510, in emit
    return self.events.emit(event, self, *args)
  File "/usr/local/lib/python3.6/dist-packages/sphinx/events.py", line 80, in emit
    results.append(callback(*args))
  File "/usr/local/lib/python3.6/dist-packages/sphinx_js/doclets.py", line 44, in gather_doclets
    doclet_full_path(d, root_for_relative_paths),
  File "/usr/local/lib/python3.6/dist-packages/sphinx_js/doclets.py", line 190, in doclet_full_path
    path_and_formal_params['path'].parse(path))
  File "/usr/local/lib/python3.6/dist-packages/parsimonious/expressions.py", line 110, in parse
    node = self.match(text, pos=pos)
  File "/usr/local/lib/python3.6/dist-packages/parsimonious/expressions.py", line 127, in match
    raise error
parsimonious.exceptions.ParseError: Rule 'path' didn't match at '../../../docs/app/ap' (line 1, column 1).
@raucao
Copy link

raucao commented Jun 26, 2020

Also see #143

@erikrose erikrose added the typescript Having to do with sphinx-js's typescript support label Jul 12, 2020
hoodmane added a commit to hoodmane/sphinx-js that referenced this issue Oct 1, 2023
…la#103)

In retrospect the filepath field already has what I needed, the trick is setting
basePath. This leaves the URL field available for linking to the source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Having to do with sphinx-js's typescript support
Projects
None yet
Development

No branches or pull requests

3 participants