Issue with pyplot

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with pyplot

matplotlib - users mailing list
Hi,
Have a problem that is driving me nuts, and have narrowed it down to pyplot,
and anything depending on pyplot.

This command works fine:
import matplotlib as mpl

But when I run
import matplotlib.pyplot as plt

The python icon in docks starts jumping up and down and I get:
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact-compat.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (index.js.map, line 0)

Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
fine up till just recently

Any ideas anyone?



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Issue with pyplot

Joe Kington
It looks like you might have things configured to default to a different backend than normal.  Are you running things inside of a notebook?  It looks like it's trying to run one of the web-based backends by default, and that backend can't set things up correctly.

What happens if you do:

python -c "import matplotlib; matplotlib.use('tkagg'); import matplotlib.pyplot as plt"

Or equivalently, try doing:

import matplotlib
matplotlib.use('tkagg')
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))
plt.show()

If these type of examples work, have a look at which backend you have things set up to use: https://matplotlib.org/faq/usage_faq.html#what-is-a-backend

Hope that helps,
-Joe

On Fri, Oct 19, 2018 at 1:39 PM ulfjoh1523 via Matplotlib-users <[hidden email]> wrote:
Hi,
Have a problem that is driving me nuts, and have narrowed it down to pyplot,
and anything depending on pyplot.

This command works fine:
import matplotlib as mpl

But when I run
import matplotlib.pyplot as plt

The python icon in docks starts jumping up and down and I get:
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact-compat.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (index.js.map, line 0)

Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
fine up till just recently

Any ideas anyone?



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Issue with pyplot

matplotlib - users mailing list
Thanks Joe!

Changing the backend from “macosx" to “tkagg” had no real impact - just that little rocket now bouncing closer to the center of the dock.
The only recent, i.e. potentially relevant update I have made is updating to Matplotlib to 3.0

It seems like the “missing” json-fies, generating a 404 GET when I run Jupyter, are related to scripting

Thanks,
Ulf
Sent from my Mac...
Ulf Johansson




On Oct 19, 2018, at 2:54 PM, Joe Kington <[hidden email]> wrote:

It looks like you might have things configured to default to a different backend than normal.  Are you running things inside of a notebook?  It looks like it's trying to run one of the web-based backends by default, and that backend can't set things up correctly.

What happens if you do:

python -c "import matplotlib; matplotlib.use('tkagg'); import matplotlib.pyplot as plt"

Or equivalently, try doing:

import matplotlib
matplotlib.use('tkagg')
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))
plt.show()

If these type of examples work, have a look at which backend you have things set up to use: https://matplotlib.org/faq/usage_faq.html#what-is-a-backend

Hope that helps,
-Joe

On Fri, Oct 19, 2018 at 1:39 PM ulfjoh1523 via Matplotlib-users <[hidden email]> wrote:
Hi,
Have a problem that is driving me nuts, and have narrowed it down to pyplot,
and anything depending on pyplot.

This command works fine:
import matplotlib as mpl

But when I run
import matplotlib.pyplot as plt

The python icon in docks starts jumping up and down and I get:
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact-compat.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (index.js.map, line 0)

Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
fine up till just recently

Any ideas anyone?



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Issue with pyplot

Benjamin Root
There are some bugfixes in master and slated for v3.0.1 (soon-ish) that may be relevant for your situation. Could you try installing from the master branch?

On Fri, Oct 19, 2018 at 5:19 PM Ulf Johansson via Matplotlib-users <[hidden email]> wrote:
Thanks Joe!

Changing the backend from “macosx" to “tkagg” had no real impact - just that little rocket now bouncing closer to the center of the dock.
The only recent, i.e. potentially relevant update I have made is updating to Matplotlib to 3.0

It seems like the “missing” json-fies, generating a 404 GET when I run Jupyter, are related to scripting

Thanks,
Ulf
Sent from my Mac...
Ulf Johansson




On Oct 19, 2018, at 2:54 PM, Joe Kington <[hidden email]> wrote:

It looks like you might have things configured to default to a different backend than normal.  Are you running things inside of a notebook?  It looks like it's trying to run one of the web-based backends by default, and that backend can't set things up correctly.

What happens if you do:

python -c "import matplotlib; matplotlib.use('tkagg'); import matplotlib.pyplot as plt"

Or equivalently, try doing:

import matplotlib
matplotlib.use('tkagg')
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))
plt.show()

If these type of examples work, have a look at which backend you have things set up to use: https://matplotlib.org/faq/usage_faq.html#what-is-a-backend

Hope that helps,
-Joe

On Fri, Oct 19, 2018 at 1:39 PM ulfjoh1523 via Matplotlib-users <[hidden email]> wrote:
Hi,
Have a problem that is driving me nuts, and have narrowed it down to pyplot,
and anything depending on pyplot.

This command works fine:
import matplotlib as mpl

But when I run
import matplotlib.pyplot as plt

The python icon in docks starts jumping up and down and I get:
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact-compat.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (index.js.map, line 0)

Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
fine up till just recently

Any ideas anyone?



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Issue with pyplot

matplotlib - users mailing list
Just installed v3.0.1 and indeed, this appears to have solved my issue. No bouncing little rockets and no “Python (not responding)" from the Activity Monitor

Thanks,
Ulf
Sent from my Mac...
Ulf Johansson




On Oct 20, 2018, at 8:16 PM, Benjamin Root <[hidden email]> wrote:

There are some bugfixes in master and slated for v3.0.1 (soon-ish) that may be relevant for your situation. Could you try installing from the master branch?

On Fri, Oct 19, 2018 at 5:19 PM Ulf Johansson via Matplotlib-users <[hidden email]> wrote:
Thanks Joe!

Changing the backend from “macosx" to “tkagg” had no real impact - just that little rocket now bouncing closer to the center of the dock.
The only recent, i.e. potentially relevant update I have made is updating to Matplotlib to 3.0

It seems like the “missing” json-fies, generating a 404 GET when I run Jupyter, are related to scripting

Thanks,
Ulf
Sent from my Mac...
Ulf Johansson




On Oct 19, 2018, at 2:54 PM, Joe Kington <[hidden email]> wrote:

It looks like you might have things configured to default to a different backend than normal.  Are you running things inside of a notebook?  It looks like it's trying to run one of the web-based backends by default, and that backend can't set things up correctly.

What happens if you do:

python -c "import matplotlib; matplotlib.use('tkagg'); import matplotlib.pyplot as plt"

Or equivalently, try doing:

import matplotlib
matplotlib.use('tkagg')
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))
plt.show()

If these type of examples work, have a look at which backend you have things set up to use: https://matplotlib.org/faq/usage_faq.html#what-is-a-backend

Hope that helps,
-Joe

On Fri, Oct 19, 2018 at 1:39 PM ulfjoh1523 via Matplotlib-users <[hidden email]> wrote:
Hi,
Have a problem that is driving me nuts, and have narrowed it down to pyplot,
and anything depending on pyplot.

This command works fine:
import matplotlib as mpl

But when I run
import matplotlib.pyplot as plt

The python icon in docks starts jumping up and down and I get:
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (preact-compat.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404
(Not Found) (index.js.map, line 0)

Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
fine up till just recently

Any ideas anyone?



--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users