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

No Module found. #12

Open
suresh24101991 opened this issue Oct 31, 2018 · 4 comments
Open

No Module found. #12

suresh24101991 opened this issue Oct 31, 2018 · 4 comments

Comments

@suresh24101991
Copy link

root@suresh:/home/suresh/Downloads/doris/datastack/stack# bash doris_stack.sh
Traceback (most recent call last):
File "/home/suresh/Downloads/Doris-master/doris_stack/main_code/doris_main.py", line 4, in
from doris.doris_stack.main_code.doris_sentinel_1 import DorisSentinel1
ImportError: No module named doris.doris_stack.main_code.doris_sentinel_1

Am getting the following issue when I try to run bash doris_stack.sh.
Kindly help me solve this issue

@Svev0
Copy link

Svev0 commented Nov 2, 2018

It seems it doesn't import doris package very well, so I solved in this way:
for every file in py in /doris_stack , doris libraries are imported from a relative path
ie: I substitute doris.doris_stack.main_code.doris_sentinel_1 withdoris_sentinel which is in the same directory.
In case of parent directory, for example in the /doris_stack/main_code/single_master_stack.py, I append the relative path:

import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
#from doris.doris_stack.functions.baselines import baselines
from functions.baselines import baselines

My Machine: Linux Mint 18.1 based on Ubuntu 16.04 with Python 2.7.14 [GCC 5.4.0 20160609]

@suresh24101991
Copy link
Author

Thank you for your kind reply. I got it solved by modifying the directory. When I run the process for Sentinel data am getting the following error.
RAW_DATA_ABSOLUTE_PATH= /home/suresh/Downloads/doris/datastack/stack/stack/20180325/swath_3/burst_4/rsmp_orig_slave_pixel.raw
Warning 4: Unable to open rsmp_orig_slave_pixel.r00 ... skipping.

ERROR 4: MFF header file read successfully, but no bands
were successfully found and opened.
Traceback (most recent call last):
File "/home/suresh/Downloads/Doris-master/doris_stack/functions/do_reramp_SLC.py", line 71, in
ChirpFilt = get_ramp(resFilename, resampled=1, type='chirp')
File "/usr/local/lib/python2.7/dist-packages/doris_stack/functions/get_ramp.py", line 82, in get_ramp
PixRgGrid = freadbk(Path_MFF_HDR,1, 1,int(Naz_res),int(Nrg_res))
File "/usr/local/lib/python2.7/dist-packages/doris_stack/functions/get_ramp.py", line 263, in freadbk
print 'Could not open'+Path_MFF_HDR
NameError: global name 'Path_MFF_HDR' is not defined
RAW_DATA_ABSOLUTE_PATH= /home/suresh/Downloads/doris/datastack/stack/stack/20180325/swath_3/burst_5/rsmp_orig_slave_pixel.raw
Warning 4: Unable to open rsmp_orig_slave_pixel.r00 ... skipping.

Kindly help me solve the same.

Thank you in advance.

Regards,
Suresh Devaraj

@Svev0
Copy link

Svev0 commented Nov 7, 2018

Pay attention when you modify py files, especially for indentation warnings (i.e.: blank spaces)

@suresh24101991
Copy link
Author

reading metadata from /home/suresh/Downloads/doris_data/stack/20181013/swath_2
/home/suresh/Downloads/doris_data/stack/20181013/swath_2
stack folder is /home/suresh/Downloads/doris_data/stack
burst is swath_2_burst_4_swath_2_burst_5
ps select is 1
max baseline is 200
master date is 2018-03-23
type ESD is ps
reading metadata from /home/suresh/Downloads/doris_data/stack/20181013/swath_2
/home/suresh/Downloads/doris_data/stack/20181013/swath_2
Traceback (most recent call last):
File "/home/suresh/Downloads/Doris_master/doris_stack/main_code/doris_main.py", line 28, in
doris_sentinel_1.run(args.parameterfilepath, start_date, end_date, master_date)
File "/home/suresh/Downloads/Doris_master/doris_stack/main_code/doris_sentinel_1.py", line 125, in run
processing.network_esd()
File "/home/suresh/Downloads/Doris_master/doris_stack/main_code/single_master_stack.py", line 1335, in network_esd
A = np.zeros(shape=(len(m_s[0]), np.max([np.max(m_s[0]), np.max(m_s[1])]) + 1))
File "/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 2252, in amax
out=out, **kwargs)
File "/usr/lib/python2.7/dist-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

Kindly help me solve the same.

Thank you in advance.

Regards,
Suresh Devaraj

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

No branches or pull requests

2 participants