Forums

IPython Notebook not showing fully on iPad

I was trying to access iPython Notebook on my iPad, but it only shows the first line of code or so. It seems that the web page is minimised somehow. Is this something that can be fixed?

I've raised a ticket and we'll have a look at fixing it.

I try this and get the same problem, only the first line of the Ipynb file is shown on the iPad using Safari browser. Any solution you can suggest please?

I have upvoted the ticket for you.

My iOS is 9.3.1 The iPhone does not have this problem.

My iOS is 9.3.1 The iPhone does not have this problem.

Quick check- do you have the same issue using a different browser? (not safari)

Hi Conrad, Yes. Chrome and Firefox show the fault in exactly the same way.

Hi Conrad, Yes. Chrome and Firefox show the fault in exactly the same way.

Hi Conrad, Yes. Chrome and Firefox show the fault in exactly the same way.

Thanks for confirming that. We can't give a firm timeline for a fix, but it's on our list.

Hi, I just changed to a paid account because of this feature, being able to use jupyter notebooks on my iPad. Do you have a timeline for the fix by now?

We don't unfortunately. The Jupyter / IPython notebook codebase isn't our own, so getting it to work on iPads is harder than it would be if it was code that we had control over.

That I do not understand. I've setup a Jupyter server on AWS and it is working without any issue. I rather would like to use your service. I like it. It takes away a lot of work and trouble for things I'm not interested in.

I appreciate your quick response. Nevertheless, the iPython/Jupyter code is working elsewhere. Basically it suggests that you have to look at your own code base and cannot blame someone else instead. Of course, it is probably a simplification of mine, but not far away of the truth.

So what is your plan to get this addressed? You did not mention it. If it is really a problem in the Jupyter code, did you file a bug report in their project? Or something else?

Please do remember that running Jupyter Notebooks is one of a very large number of things that PythonAnywhere does. The Jupyter codebase has to be integrated with large parts of ours in order to work on our system. That's a lot of hard work on our part. We have to use specific versions that may not be the latest because otherwise they clash with other parts of our system.

When we change our own code, we can manage the dependencies more easily than when we update someone else's stuff to a different version and then have to deal with the resulting dependency cascade. For example, IIRC if we installed the latest Jupyter, it would require the latest IPython, which would require other newer libraries, which could break existing code that people are currently running on PythonAnywhere that has nothing to do with notebooks.

I hope that clarifies things.

BTW thank you for the data point about it working on an iPad for you on your own AWS instance. Which version were you using?

jupyter 4.1.0 python 3.4.3 or 2.7.6 ubuntu 14.04.3 lts

But the real difference is that a pythonanywhere notebook is running in an iframe. My AWS machine serves the jupyter page directly. If one grabs the src url out of the iframe tag and paste it in the address bar, then the pythonanywhere notebook displays correctly as well. Maybe you could resolve to open the notebook in a separate window or tab if served on an iPad. There is no loss of functionality, is there?

Breaking: Use Chrome and switch to the Desktop-Version. Now the notebook displays fine and within the pythonanywhere iframe.

thanks for digging into it @killwas! :)

Awesome, thanks!

I also had trouble with the console. On the iPad the console is displayed in abitrary sizes that don't match the browser window. It is getting worse if you rotate the iPad to landscape - then you get a 127 x 3 console.

Also the input doesn't work. First it looks like OK, but then the cursor position does not match, or takes only letters but no space, or it does not take any input. Using Chrome in Desktop Version mode does not help here. So I experimentet with iCab Mobile where one can switch the browser ID.

I almost gave up, but then "Chrome 41 (Android 4.4)" did the job. Currently this looks like the solution for all display and input problems, whether for the notebook or the console.

Nice side-effect: I use iCab Mobile in Twin-browser mode. On one side my pythonanywhere, on the other side the documentation or tutorial.

I hope that's it. Now I'm happy and want to be productive with python. Anywhere! Sorry for the pun. :-)

Great! Hopefully other people will find these tips useful. Sounds like switching to Chrome was the main thing?

The main thing was telling the web server that the client is a Chrome 41 browser for Android 4.4. In reality every browser on iOs is based on WebKit. Therefore it is the pythonanywhere server that is changing something in the code that is send to the client. I did not analyze what. I leave this to you guys and hope that you will fix it rather sooner then later.

It is not all good with the workaround. Cursor and display need to be convinced all the time to do what you want. The soft keyboard has two buttons (up,down) in the upper right corner, I think they are for command history, but don't work like that in the console or editor. However, if the down button is enabled, pressing it helps to recover the input - often times the console or editor don't show the keyboard input.

I'm not planning to try to use Android Chrome on the iPad.

Hmmm. I guess something changed again. It is not working on iPad chrome for me. iPad Pro, iOS 10.2.1

to clarify- is it the console or the jupyter notebook that isn't working? and have you tried the switch to desktop version thing to see if that works?

Sorry for not being thorough. I tried requesting the desktop version and it is in fact working for the notebook. :)

Excellent, thanks for confirming!

Useful thread! I had this same issue, on both chrome and safari, on two different iPads.

On both devices, and both browsers, the solution was to "request desktop site".

Similarly to as described above, it seemed as though an iframe containing the cells was incorrectly sized.

In desktop mode they come through as expected.

I hope that helps in finding an eventual permanent solution.

Thanks for the info. I'm guessing, then, that in mobile mode, the browser is messing with the sizing in a way that the desktop mode does not.