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
Fixes #979 : No figures in DKI example - Add new line after figure #981
Conversation
Did you run the makefile to make sure the html renders properly with this fix? |
Hi, I was building the docs using sphinx. But the datasets are taking a long time to download. Maybe someone who's working on the website can take a look and this can be resolved faster. @ghoshbishakh ? |
You can comment (using |
Thanks. I will run the makefile and see if the plots are rendering fine. 😄 |
Any update on this? |
Hi, I commented and ran the make file. But I get stuck everytime at "Downloading "HARDI150.nii.gz" to /home/shahnawaz/.dipy/stanford_hardi" I am trying to figure out if its an issue with my connection or something to do with the large file size. I tried to separately download the file from the link but it shows that file doesn't exist. I am also not able to download sherbrooke_3shell. So I went to the site from fetcher Again ran into a 404 in dropbox |
Using just the links on these lines shouldn't work. The links should be used like this: "https://stacks.stanford.edu/file/druid:yx282xq2090/dwi.nii.gz" etc. That said, I do think there's a problem with the recent changes to the fetcher. I'm looking into that right now. |
I hope the progressbar change did not break anything here |
Alas, I think it has. I am getting this:
|
Might just be a connection issue on my side. I will try to manually
|
aaah looking into it!! |
steps to regenerate the issue? |
On Python2 (might that be the issue?), move the data folder out of the way. Then:
|
Yeah. I was running it in Python2.7. Another point to be noted is I can
|
ok got the problem. trying to fix it asap! seems sometimes http headers dont have the content-length |
so downloading: @arokem what do you recommend doing here. |
So this would never work for this data, correct? What data-set does it work well for? |
So it depends on the server from which it is being served. Simply if we try to download the dataset from the browser using the link and the browser cannot predict the size of the download then it will also not work here, i.e the content-length header is missing. |
Should we open a new issue for this ? |
Yes - let's move this conversation to #1014 |
I ran into one more issue in reconst_dti.py. By commenting all the other files as suggested by @Garyfallidis I got this when I run make html for only reconst_dti.py Computing anisotropy measures (FA, MD, RGB)
Computing tensor ellipsoids in a part of the splenium of the CC
Traceback (most recent call last):
File "../tools/make_examples.py", line 123, in <module>
execfile(script, namespace)
File "reconst_dti.py", line 219, in <module>
ren = fvtk.ren()
AttributeError: 'module' object has no attribute 'ren'
make: *** [rstexamples-stamp] Error 1 The issues arises from ren = fvtk.ren and the corresponding import is found here have_fvtk comes from the optional package |
Do you have VTK installed? That error often get's thrown when you don't On Wed, Mar 23, 2016 at 4:08 PM, Shahnawaz Ahmed notifications@github.com
|
I tried "make html" but the images are not rendering with plt.show() and commenting savefig(). So I went to the other examples reconst.dti and saw that fvtk is used for rendering plots. Why is the case different here? @arokem @Garyfallidis Any suggestions? Should this example be rewritten along the lines of other examples with fvtk? |
There are several examples that use matplotlib, without a hitch. For example: http://nipy.org/dipy/examples_built/brain_extraction_dwi.html#example-brain-extraction-dwi |
So no - I wouldn't change this to use fvtk. We can certainly use matplotlib here as well. |
Ok. Thanks. I will see why it is not rendering here with matplotlib. |
@arokem @Garyfallidis Solved the plotting issue. I didn't have to remove savefig(). It was just a matter of incorrect syntax for rst files. According to the documentation, after the figure directive, there should be a new line before image description. I tried make html and got the plots. The power of a "\n" !! Got a good nice intro to sphinx 😄 |
Fantastic! They don't call it "sphinx" for nothing - cryptic, mysterious and powerful! @Garyfallidis : do we have a plan for merging upstream fixes into the current web-page? Do we cherry pick these fixes into maint/0.11.x and build the website from that? |
That was the same problem for #1024 |
Also white-space, but seems to be in a different part of the file... |
Edit: New line required after figure word directive in examples.
Commenting out savefig() in the example should render the plots in sphinx.