Closed lexnederbragt closed 9 years ago
Oy! That's a problem. Two questions:
(1) Can you send a link to the .ipynb file?
(2) What shows up in your developer console?
Thanks in advance, Jeremy
Hi @lexnederbragt, just checking on this. The rendered notebook should appear once you pick a file. But it's possible that there's a bug in the nbpreview
or notebookjs
code. If you send me your .ipynb
file, I can try debugging. Thanks!
I now suspect that it is an issue with IPython3. An older notebook from IPython2 opened nicely, but after converting to the new format reopening failed.
Seems to be the case! I've added support for IPython3's notebook format to notebook.js
and upgraded nbpreview
to use the upgraded library. When you get a spare moment, give it a whirl. Working now?
Seems to be working now, yes!
I have the same issue. I just cloned the repo today, but still a notebook with format 3 renders, but the same converted to format 4 does not render.
In the webconsole I get the error "TypeError: m.language_info is undefined notebook.min.js:1:1163"
Sorry to hear that, and thanks for flagging. Are you able to share the notebook? (If you'd rather not post it in the issue thread, feel free to email it to me: jsvine@gmail.com.)
it happens even with a simple notebook. An example that fails: https://gist.github.com/jorisvandenbossche/70bc824af4542b891942
Thanks, @jorisvandenbossche. Looks like I wasn't properly accounting for the differences in how converted vs. non-converted notebooks represent text (a string vs an arrays of strings). I've pushed a commit — https://github.com/jsvine/nbpreview/commit/bc257ed26d66d145283b868402cc0014f40771f5 — that should fix this. Let me know, though, if that fails.
Sorry for that late answer, but that indeed fixed it!
Only, now I have another issue: all lines apart from the first (in code cells) are starting with a ,
. Eg a code cell looks like this:
fig, ax = plt.subplots()
,ax.hist(data['speed'][data['speed'].notnull()].values, 50)
,ax.set_xlabel('Speed')
Odd! This doesn't seem to be happening with the previous notebook you shared. Could you share another that exhibits this problem?
Hi @jorisvandenbossche, I think I've been able to replicate the problem you were running into, and to fix it. I've just pushed the fixes to master
and gh-pages
. Give it a whirl: https://jsvine.github.io/nbpreview/
Does that improve things?
That indeed solves it!
Hi,
When I pick a file, nothing happens. What is supposed to happen?