TsotsosLab / SMILER

The Saliency Model Implementation Library for Experimental Research.
Other
44 stars 16 forks source link

SMILER clean command error #47

Closed f-wright closed 2 years ago

f-wright commented 2 years ago

The SMILER clean command is supposed to delete the built images and downloaded files for SMILER. Currently, a line in the code for the clean command generates a type error and crashes. This is on a version still of SMILER running Click 4.0. The full error message is:

Traceback (most recent call last):
  File "/home/fwright/SMILER/smiler", line 274, in <module>
    cli()
  File "/home/fwright/anaconda3/envs/smiler/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/fwright/anaconda3/envs/smiler/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/fwright/anaconda3/envs/smiler/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fwright/anaconda3/envs/smiler/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fwright/anaconda3/envs/smiler/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/fwright/SMILER/smiler", line 68, in clean
    line.split()[2] for line in output_str.strip().split('\n')[1:]
TypeError: a bytes-like object is required, not 'str'
f-wright commented 2 years ago

@cfmcint you're working on updating Click, right? Do you get this same error on your version of SMILER with an updated Click?

cfmcint commented 2 years ago

@f-wright at what point when running the clean command did you get this error?

f-wright commented 2 years ago

@cfmcint immediately, I don't think it had cleaned anything yet.

cfmcint commented 2 years ago

Okay, so when I select that I want to delete the various things I run into this error image which looks like the same error you are getting.

f-wright commented 2 years ago

Oh okay, could you show me what happens between your command and that error?

cfmcint commented 2 years ago

image

I get that error right after I enter my sudo password.

f-wright commented 2 years ago

Okay, that's exactly what happens on mine, so I guess updating Click won't solve it.

cfmcint commented 2 years ago

Yeah, it seems to be another issue, unfortunately.