question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error handling if snap is not installed

See original GitHub issue

Up 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:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
johntruckenbrodtcommented, Mar 22, 2018

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 subdirectory bin of the path you provide here to PATH and try it again.

0reactions
johntruckenbrodtcommented, Mar 22, 2018

nice one! The UserWarning is fine.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found