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

Documentation build fails on readthedocs #86

Closed
MassimoCimmino opened this issue Apr 11, 2021 · 2 comments · Fixed by #88
Closed

Documentation build fails on readthedocs #86

MassimoCimmino opened this issue Apr 11, 2021 · 2 comments · Fixed by #88

Comments

@MassimoCimmino
Copy link
Owner

MassimoCimmino commented Apr 11, 2021

Here is the log:

Running Sphinx v1.8.5

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygfunction/envs/latest/lib/python2.7/site-packages/sphinx/cmd/build.py", line 303, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygfunction/envs/latest/lib/python2.7/site-packages/sphinx/application.py", line 201, in __init__
    self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygfunction/envs/latest/lib/python2.7/site-packages/sphinx/config.py", line 203, in read
    namespace = eval_config_file(filename, tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygfunction/envs/latest/lib/python2.7/site-packages/sphinx/config.py", line 373, in eval_config_file
    raise ConfigError(msg % err)
ConfigError: There is a syntax error in your configuration file: invalid syntax (boreholes.py, line 140)

Configuration error:
There is a syntax error in your configuration file: invalid syntax (boreholes.py, line 140)
Command time: 0s Return: 2

The reference is to:

output = f"{ '*gt.boreholes.find_duplicates()*' :-^50}"

It may also fail on the next few lines:

print(f"{'*gt.boreholes.remove_duplicates()*' :-^50}".\

@MassimoCimmino
Copy link
Owner Author

Another option to format the string is : ' gt.boreholes.find_duplicates() '.center(50, '-')

I don't know why Sphinx does not like the initial implementation (it works fine on my machine).

@MassimoCimmino
Copy link
Owner Author

The build later failed on:

def __init__(self, mixer: str, percent: float,
T: float = 20., P: float = 101325.,):

I found that readthedocs was building the docs using Python 2, which does not support function annotations. A configuration file is introduced in d4fa4a3.

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.

1 participant