uwhpsc-2016 / homework1

Homework #1
1 stars 1 forks source link

no output in notebook #23

Open gadamico opened 8 years ago

gadamico commented 8 years ago

Sometimes a syntax error in the definition of a function seems to prevent the Jupyter notebook from displaying any output at all when one tries to run the function. It may be that this is what's going on with one of my functions for Exercise #1, but I've been staring at the code for a while now and I don't see any problem with it. Maybe I could try running the code in the terminal, but I don't know how to do the indentations etc.

cswiercz commented 8 years ago

I'm having trouble understanding the issue without seeing what's going on the code. If you push your changes to your GitHub private repo the TAs and I will be able to take a look at your results.

For your notebook issue it could be that a cell that you executed has encountered an infinite loop. (Certainly possible with some of the problems in the homework!) You can tell if a cell is still executing if it has the label,

In [*]:

Once the cell finishes executing it will be labeled as,

In [###]:

where "###" is some number.

gadamico commented 8 years ago

Okay. I did recently attempt to push my changes (I've only worked on Exercise 1 so far) to my private repo. Honestly, it would give me some peace of mind just to hear from you that I did successfully do that!

I did see '[*]' sometimes, so that helps. I think I also forgot to reload/restart the kernel after I'd tinkered with the code a bit, so Jupyter may have been working with code that I meant to have superseded.

cswiercz commented 8 years ago

You can see the state of your GitHub repo here: https://github.com/uwhpsc-2016/homework1-gadamico

From what I see in the commits list your local commits haven't been pushed yet.

Also, if you are testing code that you are writing in the homework1/exercise1.py, etc., within a Jupyter notebook you will have to restart the kernel before executing something like

from homework1.exercise1 import collatz

in the notebook.

cswiercz commented 8 years ago

I assume this issue is resolved so I will label it as "Answered"