Error handling if snap is not installed
See original GitHub issueUp to now pyroSAR raised an ValueError
if snap was not installed. I changed this characteristic to an UserWarning
. In my opinion it is more advantageous because if we check the snap installation in snap\__init__.py
and snap is not installed we have not a chance to test the code due to the ValueError
that is thrown at the import procedure. Now, if snap is not installed the following warning will appear:
warnings.warn("One of the executables {0} should be installed. You can download it from http://step.esa.int/main/toolboxes/snap/ or you can specify a path with snap_config.set_path(path_to_snap)".format(name), UserWarning)
Now I am able to test the thrown UserWarning
and we increase our coverage up to 27%. Moreover, I could not test the code with TRAVIS CI because the command find_executable
does not work with TRAVIS.
What do you think guys?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[Fixed] error: snap “package” not found Ad - LinuxAndUbuntu
If you see the error: snap "package" not found , that suggests you already have snap support installed. The above message indicates that...
Read more >Troubleshooting | Snapcraft documentation
If an executable isn't in your path, try using the snap run command, such as snap run spotify .
Read more >Why do you see error: snap “xyz” not found? - It's FOSS
If the output doesn't consist the application you were trying to install, it means that application is not available for your system. Hold...
Read more >Can't install snap apps - Ask Ubuntu
The following worked on my system: sudo apt-get install snapd sudo snap install notes. I needed to log out and then back in...
Read more >unhelpful error message when snap is installed already
SnapNotFound with 2 snaps" Turns out, this snap was already installed. Returned error message is not helpful at all. snapd 2.32.9+18.04 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ah okay. Usually SNAP is installed into a separate directory structure and not in the usual linux installation structure (with subdirectories
bin,
lib
,etc
, …). Maybe you need to first add the path to the SNAP exectuables to the PATH environment. You can tell the SNAP installer where to install to in the unattended console mode. See here. Try adding the subdirectorybin
of the path you provide here to PATH and try it again.nice one! The
UserWarning
is fine.