Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript Error failed to load model class 'MPLCanvasModel' from module 'jupyter-matplotlib' #1012

Open
ClementGold opened this issue May 26, 2023 · 1 comment

Comments

@ClementGold
Copy link

ClementGold commented May 26, 2023

Description of the problem

Dear All,

MintPY work as well in my computer but when I wanted to put the displacement time series or the view now it's showing nothing...

I have ipywidgets, ipympl

Before I was able to plot all the figure but for the time series not able to move the cursor of the time, I installed ipympl and now it's showing nothing unless the javascript error

Full script that generated the error

%matplotlib widget
​
tsview.main([f'{work_dir}/timeseries.h5'])


tsview.py /home/ec2-user/SageMaker/efs/underwriters/CLEMENT/DockerMINTPY/JACKARTA2020_2021/mintpy/timeseries.h5
open timeseries file: timeseries.h5
No lookup table (longitude or rangeCoord) found in files.
data   coverage in y/x: (0, 0, 762, 734)
subset coverage in y/x: (0, 0, 762, 734)
data   coverage in lat/lon: (679120.0, 9351600.0, 740080.0, 9292880.0)
subset coverage in lat/lon: (679120.0, 9351600.0, 740080.0, 9292880.0)
------------------------------------------------------------------------
estimate deformation model with the following assumed time functions:
    polynomial : 1
    periodic   : []
    stepDate   : []
    exp        : {}
    log        : {}
reading timeseries from file /home/ec2-user/SageMaker/efs/underwriters/CLEMENT/DockerMINTPY/JACKARTA2020_2021/mintpy/timeseries.h5
reference to date: 20200606
read mask from file: maskTempCoh.h5
data    range: [-48.146526, 38.036682] cm
display range: [-15.890517, 17.67339] cm
create figure for map in size of [6.8, 6.0]
display data in transparency: 1.0
plot in geo-coordinate
plotting image ...
plot scale bar: [0.2, 0.2, 0.1]
plot reference point
create figure for point in size of [8.0, 4.5]
showing ...

------------------------------------------------------------------------
To scroll through the image sequence:
1) Move the slider, OR
2) Press left or right arrow key (if not responding, click the image and try again).

Full error message

Failed to load model class 'MPLCanvasModel' from module 'jupyter-matplotlib'
@https://science-t3-xlarge-1.notebook.eu-west-1.sagemaker.aws/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.40eaa5b8e976096d50b2.js?v=40eaa5b8e976096d50b2:1:74865
asyncFunctionResume@[native code]
@[native code]
promiseReactionJobWithoutPromise@[native code]
promiseReactionJob@[native code]

System information

I have mintpy 1.5.1

Best regards,
Clément

@yunjunz
Copy link
Member

yunjunz commented Jun 25, 2023

Testing at openSARLab shows a similar error for tsview.py in jupyter lab as well.

%matplotlib widget
import os
from mintpy.cli import tsview

work_dir = os.path.expanduser('~/data/test/FernandinaSenDT128/mintpy')
os.chdir(work_dir)
print('Go to directory:', work_dir)

tsview.main('timeseries.h5 --yx 220 300 --figsize 9 3 --ref-date 20141225'.split())

The error message is as below:

Go to directory: /home/jovyan/data/test/FernandinaSenDT128/mintpy
tsview.py timeseries.h5 --yx 220 300 --figsize 9 3 --ref-date 20141225
open timeseries file: timeseries.h5
data   coverage in y/x: (0, 0, 600, 450)
subset coverage in y/x: (0, 0, 600, 450)
data   coverage in lat/lon: None
subset coverage in lat/lon: None
------------------------------------------------------------------------
DESCENDING orbit -> flip left-right
estimate deformation model with the following assumed time functions:
    polynomial : 1
    periodic   : []
    stepDate   : []
    polyline   : []
    exp        : {}
    log        : {}
reading timeseries from file timeseries.h5
reference to date: 20141225
read mask from file: maskTempCoh.h5
data    range: [-7.4682674, 6.854181] cm
display range: [-3.8803086, 5.781048] cm
create figure for map in size of [8.7, 6.0]
display data in transparency: 1.0
plotting in Y/X coordinate ...
plotting Data ...
plot reference point
plot points of interest
flip figure left and right
create figure for point in size of [9.0, 3.0]

---------------------------------------
Y/X = 220, 300, lat/lon = -0.37178, -91.53018
[-1.45, 0.0, -0.29, -0.15, -0.65, 2.14, 0.85, 1.33, 1.5, 0.96, 1.29, -0.19, 0.61, 0.07, 0.7, 1.22, 1.4, 0.89, 1.51, 0.75, -0.9, 1.71, 1.77, 1.53, 2.39, 2.4, 1.45, 2.15, 3.79, 4.34, 4.13, 4.21, 4.54, 3.99, 5.01, 5.27]
time-series range: [-1.45, 5.27] cm
time function parameters:
    intercept: -1.13 +/-  0.36 cm
    velocity :  3.59 +/-  0.41 cm/year
showing ...

------------------------------------------------------------------------
To scroll through the image sequence:
1) Move the slider, OR
2) Press left or right arrow key (if not responding, click the image and try again).
------------------------------------------------------------------------
Error displaying widget: model not found
Error displaying widget: model not found

The same testing on my laptop works well. I don't know the cause yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants