Jupyter labs not running


None of the Jupyter labs will run successfully.
Screenshots are attached.
Clicking RUN simply moves down a section, with errors.

How can we run the labs?

Thankyou.

2 Likes

This is supposed to be a markdown cell (a text not code). Go to the box above on Code (below Widgets) and click the arrow and choose markdown.

1 Like

Sorry, this does not solve the issue.

There is supposed to be an interactive 3D plot.
But nothing “runs” as the lecturer suggests it should.

To quote the lecturer:
“Finally, the optional lab also has a 3D surface plot that you can manually rotate and spin around using your mouse cursor to take a better look at what the cost function looks like.”

But there is no 3D plot to “manually rotate and spin”, as clicking RUN simply moves to the next section.

How do we run the Jupyter notebook and to get what is described in the lecture?

Regards,
James.

2 Likes

If the animated graphic doesn’t appear, it could be that your browser is blocking the graphics popup animation. Try disabling any popup blockers, or try an anonymous or private session.

The issue with the error message is that the Markdown cell was somehow split into a Code section. The entire cell should be Markdown.

I think your lab notebook file has been edited or mangled. You may need to get a new copy.

1 Like

Graphics popup?

I have loaded the page containing the Jupyter notebook directly from the course - no offline download.
Done this on two browsers - Firefox and Chromium. On Windows 10 and Fedora.
There are no popups.

What part of the page is supposed to load a graphical plot?
It seems to be this section…

"Cost Function Visualization- 3D

You can see how cost varies with respect to both w and b by plotting in 3D or using a contour plot.
It is worth noting that some of the plotting in this course can become quite involved. The plotting routines are provided and while it can be instructive to read through the code to become familiar with the methods, it is not needed to complete the course successfully. The routines are in lab_utils_uni.py in the local directory."

But when I click on that section and click RUN (with the dropdown menu autoselected CODE), then this is shown in the page:

x_train = np.array([1.0, 1.7, 2.0, 2.5, 3.0, 3.2])

y_train = np.array([250, 300, 480,  430,   630, 730,])

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-16-04691b625c9c> in <module>
----> 1 x_train = np.array([1.0, 1.7, 2.0, 2.5, 3.0, 3.2])
      2 y_train = np.array([250, 300, 480,  430,   630, 730,])

NameError: name 'np' is not defined

What is the expected output?
Is a popup supposed to load as the page loads?
Or do popups open when certain parts of the page are “RUN” ?

Thanks in advance, nothing happens at all.

EDIT:
Fixed formatting.

2 Likes

Sorry, “pop-up” was the wrong term. “graphics widget” is more apt.

The problem “name ‘np’ not defined” means that you did not run the cell that imports the numpy package.

Every time you open a notebook, you must run all of the cells starting from the top.

1 Like

Hello TMosh,

Running every cell, starting from the top is what I am doing.

I click RUN.
Then the focus moves to the next cell. Sometimes the cell type changes from MARKDOWN to CODE.

But nothing happens when each cell is “run”.
Sometimes the content in the cell changes to error messages, like the screenshot I posted.

If the Jupyter notebooks do not load in the webpage, is there an offline or external viewer that can run the Jupyter notebooks ?

Similar to off line pdf viewers ?

These Jupyter notebooks are part of the paid course and I would like to have them running.

Regards,
James.

2 Likes

I have never before heard of what you’re describing, and I’ve been mentoring courses here for several years.

Cell types will never change based on you pressing the “Run” button.

I have not heard of anyone having problems running the notebooks.

1 Like

Some cell types are CODE.
Some cell types are MARKDOWN.

Each time I click RUN, a selection rectangle moves to the next cell.

If that cell is html and text, then the dropdown changes to MARKDOWN.
If the cell has python code, then the dropdown changes to CODE.

But nothing actually runs.

Is there an offline viewer that I can run the Jupyter notebooks in?

1 Like

What “dropdown” are you referring to?

Please see the attached screenshot.

There is a dropdown menu currently on MARKDOWN.
This dropdown is to the right of the RUN button.

Everytime the RUN button is pressed, the selection rectangle moves to the next section.
If the section has code, then the dropdown changes to CODE.

But nothing actually “runs”.

EDIT:
I can take a video and provide a link, but I think the description and screenshot is sufficient. Is it?

2 Likes

Hello TMosh,

I am still having issues, for a service that costs money.
May I please get a resolution?

If I need to supply more information, then I will do exactly that.

Kind Regards,
James.

2 Likes

The mentors are all community volunteers. Personally, I’ve been busy with my life this weekend.

I can turn some attention to this issue tomorrow.

I’m not aware of any other students having this issue, so I suspect it’s something unique to your situation.

Ah, I see.
Apologies, I thought you were employed by Coursera!

The money from their course has to go somewhere, I thought some would be spread across support.

Well that is a bugger, as their email support declines assistance as this is “…not a platform issue.”

So they are happy to take $74 per month, but when something breaks, they will not help. Wonderful.
They directed me to these forums instead.

I will get on their case again, as this is not good.

Thanks,
James.

2 Likes

((double posting as I had not included you in a Reply))

Thankyou for your help.
I have spent hours on this myself.

I have downloaded what appeared to be offline Jupyter viewers, but as I am new at Python… I am not sure if I execute this environment from the Python terminal or not.

Opening the downloaded Jupyter files in the environment also results in errors - as though other Python code is expected.

So far nothing has worked. I even tried a Linux desktop.

I will keep hunting for a solution in the meantime.

Thanks for help.

2 Likes

The method is you open the notebook in Coursera Labs using your browser.

You run the notebook right there in the Coursera web page.

1 Like

Hi TMosh,
All that I get are errors.

Here are some more screenshots.
And thanks - I thought you were employed by Coursera for their support, as they directed me here! See earlier post.

Link to another lab, also not running.

From viewing the lecture prior to the lab, the code above Increased Learning Rate should render a convex plot of Squared Error Cost.
Here is a screenshot of what the Jupyter notebook looks like before “running”.
((SEE ATTACHMENT - lab2a.png))

Then when the code segment is selected and “run”, the following happens (lines of errors).
((SEE ATTACHMENT - lab2b.png))

Another help ticket has been generated with Coursera, as this kind of support is in the domain of a paid-for product.

The Jupyter notebooks do not run in Firefox or Chrome and I struggle to work out why. Coursera support folk - any advice ?

Thanks,
James.


1 Like

stupid reply button not clicked by myself…

1 Like

This Jupyter lab using NumPy worked.

Perhaps the other labs are missing libraries or have missing code for the environment they are run in?
These other labs (are supposed to) produce graphical plots, but all result in lines of error code.

Something seems incomplete with the Jupyter labs, or the author assumes certain libraries are loaded when they are not.

Coursera help crew? Chip in whenever you like!

2 Likes

Downgraded to an older web browser version.

Jupyter notebooks now working.

1 Like