Skip to content

Conversation

@larsoner
Copy link
Contributor

@larsoner larsoner commented Aug 5, 2016

Using the bleeding-edge (updated today) version of Sphinx, it looks like files that were originally:

_build/html/generated/mne.pick_types.rst.html

Are now put in:

_build/html/generated/mne.pick_types.html

The fix here just strips the .rst before appending the .html, but will probably only work on latest sphinx. Is this a bug that should be fixed by sphinx-gallery, or did Sphinx do something they shouldn't have done by changing the filename?

@larsoner
Copy link
Contributor Author

larsoner commented Aug 5, 2016

FYI the traceback looks like this on failure:

Embedding documentation hyperlinks in examples..
    processing: index.html
    processing: plot_linear_regression_raw.html

Exception occurred:
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 48, in _get_data
    with open(url, 'r') as fid:
IOError: [Errno 2] No such file or directory: '/home/larsoner/custombuilds/mne-python/doc/_build/html/generated/mne.pick_types.rst.html'
The full traceback has been saved in /tmp/sphinx-err-Oj8s3Z.log, if you want to report the issue to the developers.

And in the log:

Traceback (most recent call last):
  File "/home/larsoner/custombuilds/sphinx/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/home/larsoner/custombuilds/sphinx/sphinx/application.py", line 347, in build
    self.emit('build-finished', None)
  File "/home/larsoner/custombuilds/sphinx/sphinx/application.py", line 584, in emit
    results.append(callback(self, *args))
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 436, in embed_code_links
    _embed_code_links(app, gallery_conf, gallery_dir)
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 375, in _embed_code_links
    full_fname)
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 298, in resolve
    link = self._get_link(cobj)
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 249, in _get_link
    html = get_data(link, self.gallery_dir)
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 66, in get_data
    data = _get_data(url)
  File "/home/larsoner/custombuilds/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 48, in _get_data
    with open(url, 'r') as fid:
IOError: [Errno 2] No such file or directory: '/home/larsoner/custombuilds/mne-python/doc/_build/html/generated/mne.pick_types.rst.html'

I also get a slew of these, but at least with the "fix" here the build passes:

    processing: plot_sensor_permutation_test.html
The following error has occurred:

HTTPError()
The following error has occurred:

HTTPError()
The following error has occurred:

HTTPError()
    processing: plot_fdr_stats_evoked.html
The following error has occurred:

HTTPError()
    processing: plot_sensor_regression.html

@Titan-C
Copy link
Member

Titan-C commented Aug 5, 2016

Using the bleeding-edge (updated today) version of Sphinx, it looks like files that were originally:

_build/html/generated/mne.pick_types.rst.html

This is unexpected. For me they never had the .rst part in the filename. I fear it is more an issue with Sphinx itself.

@Titan-C
Copy link
Member

Titan-C commented Aug 5, 2016

I also get a slew of these, but at least with the "fix" here the build passes:

I actually see the error you mention in Travis, so the "fix" breaks our config. I really fear is an issue with Sphinx.

@larsoner
Copy link
Contributor Author

larsoner commented Aug 5, 2016

Cool, I'll close this and hope the Sphinx folks notice/fix it, and if not, I'll open an issue with them at some point

@larsoner larsoner closed this Aug 5, 2016
@larsoner larsoner deleted the sphinx-file branch August 8, 2016 14:21
@larsoner
Copy link
Contributor Author

larsoner commented Dec 9, 2016

It looks like this problem made it into their latest release now on Anaconda:

https://circleci.com/gh/mne-tools/mne-python/3267

Should I revive this one? I suspect it will break people's builds soon.

@Titan-C
Copy link
Member

Titan-C commented Dec 9, 2016

I guess I comes from Sphinx=1.5 being released. I also experienced the travis build of sphinx-gallery to fail while I was preparing the latest release of the gallery v0.1.5. See our travis.yml which now forces the Sphinx version to before latest for ubuntu which need to install from pip. Most probably I'll have to include the same restriction for the conda envs.

@Titan-C
Copy link
Member

Titan-C commented Dec 9, 2016

I just restarted the build on this PR so see how it behaves.

@larsoner
Copy link
Contributor Author

larsoner commented Dec 9, 2016

It errors with NameError: name 'First_test_fail' is not defined but I don't think that's related?

If we want to use this PR I could try to make it smarter by checking sphinx version, and choosing the name based on that. How does that sound?

@larsoner
Copy link
Contributor Author

larsoner commented Dec 9, 2016

New version in #178

@GaelVaroquaux
Copy link
Contributor

GaelVaroquaux commented Dec 12, 2016 via email

@larsoner
Copy link
Contributor Author

It is closed already isn't it?

@GaelVaroquaux
Copy link
Contributor

Oops, sorry, I missed that email

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 this pull request may close these issues.

3 participants