2 years ago
#54630
Eleonora Panini
open h5 file on colab and find packages in libraries
I have a problem with a h5 file. I don't know how to open it. It is in my google drive.
This is the code:
import h5py
import math
import numpy as np
import scipy
import mathplotlib.pyplot as plt
from scipy import signal
from scipy import get_window forma onda
import io
from google.colab import drive
drive.mount('/gdrive')
url="https://drive.google.com/file/d/1sSEbrMYNxiDLwfWHwKGvqbwoP5Hygy2f/view?usp=sharing"
with open(url, 'r') as f:
UTC_TIME=f["UTC_TIME"][()][:,0]
GEO_LAT=f["GEO_LAT"][()][:,0]
GEO_LON=f["GEO_LON"][()][:,0]
ALT=f["ALTITUDE"][()][:,0]
Workmode=f["WORKMODE"][()][:,0]
A131_W=f["A131_W"][()][:,0]
A132_W=f["A132_W"][()][:,0]
A133_W=f["A133_W"][()][:,0]
A131_P=f["A131_P"][()][:,0]
A132_P=f["A132_P"][()][:,0]
This is the error:
FileNotFoundError Traceback (most recent call last)
<ipython-input-21-4514d49cf415> in <module>()
22
23 #OrbitNumber=url.split("_")[6];
---> 24 with open(url, 'r') as f:
25 #f.write(r.content)
26
FileNotFoundError: [Errno 2] No such file or directory: 'https://drive.google.com/file/d/1sSEbrMYNxiDLwfWHwKGvqbwoP5Hygy2f/view?usp=sharing'
An other problem is that colab could not find the packages into the libraries (ex: get_window in scipy) although they are installed. How can I solve this problem?
python
numpy
h5py
0 Answers
Your Answer