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

Failed loading sky mask. #53

Open
Addalin opened this issue Nov 21, 2019 · 2 comments
Open

Failed loading sky mask. #53

Addalin opened this issue Nov 21, 2019 · 2 comments
Labels
Proxy Related Type: Bug Something isn't working

Comments

@Addalin
Copy link
Owner

Addalin commented Nov 21, 2019

Describe the bug
A clear and concise description of what the bug is.

Traceback (most recent call last):
  File "/VISL2_net/addalin/code/cameranetwork/CameraNetwork/controller.py", line 216, in __init__
    self.sky_mask_base = sio.loadmat(gs.MASK_PATH)['mask_base']
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 208, in loadmat
    matfile_dict = MR.get_variables(variable_names)
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio5.py", line 292, in get_variables
    res = self.read_var_array(hdr, process)
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio5.py", line 252, in read_var_array
    return self._matrix_reader.array_from_header(header, process)
  File "mio5_utils.pyx", line 675, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
  File "mio5_utils.pyx", line 705, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
  File "mio5_utils.pyx", line 778, in scipy.io.matlab.mio5_utils.VarReader5.read_real_complex
  File "mio5_utils.pyx", line 450, in scipy.io.matlab.mio5_utils.VarReader5.read_numeric
  File "mio5_utils.pyx", line 355, in scipy.io.matlab.mio5_utils.VarReader5.read_element
  File "streams.pyx", line 195, in scipy.io.matlab.streams.ZlibInputStream.read_string
  File "streams.pyx", line 188, in scipy.io.matlab.streams.ZlibInputStream.read_into
IOError: could not read bytes
ERROR:root:None

To Reproduce
cd /code/cameranetwork$ cd scripts_client/
python start_local.py -d "/VISL2_net/amitibo/experiment_2017_02-03/"

On VISL machine

@Addalin Addalin added Proxy Related Type: Bug Something isn't working labels Nov 21, 2019
@OmerShubi
Copy link
Collaborator

According to anishathalye/neural-style#47 this is due to corrupted file. Should download it again and try again.

On my station it works for the given camera folder that I have.

Using Scipy version 1.2.1

Anyways, this is the code that is responsible:

# Sky mask
#
if os.path.exists(gs.MASK_PATH):
try:
self.sky_mask_base = sio.loadmat(gs.MASK_PATH)['mask_base']
except Exception, e:
logging.error("Failed loading sky mask.")
logging.error("{}".format(traceback.print_exc()))
self.sky_mask_base = None
else:
self.sky_mask_base = None

and mask path is given by

MASK_PATH = os.path.join(HOME_PATH, 'mask_img.mat')

@OmerShubi
Copy link
Collaborator

I ran start_local with only some of the cameras (111c 112b 115b 120) and didn't experience any issues.
However, the others from here ['cam_110bL', 'cam_117L', 'cam_109bL', 'cam_115bL', 'cam_111cL', 'cam_119bL', 'cam_120L', 'cam_112bL'] did raise for one of them. this further suggests a corrupted file in one of them..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proxy Related Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants