security-scripts icon indicating copy to clipboard operation
security-scripts copied to clipboard

check for import with a single try

Open thebigbone opened this issue 1 year ago • 5 comments

thebigbone avatar May 14 '23 06:05 thebigbone

Thanks for the PR - however, it's the idea that the user gets a nice error message if the import goes awry. What would be the advantage of removing that statement?

PeterMosmans avatar May 15 '23 18:05 PeterMosmans

I have not removed that statement. And you are right, for some reason it seems like that but if you look at my fork, it's not removed. I have just removed the double check for the imports, which seems unnecessary.

thebigbone avatar May 16 '23 04:05 thebigbone

Any update on this? As mentioned earlier, the error message is still there.

thebigbone avatar Apr 02 '24 16:04 thebigbone

Thanks for the ping ;) -I agree on removing the double unnecessary try block. However, I do think there's value in showing a "nice" error message instead of the default one. Would you mind amending your PR with keeping the nice message? Thanks!

PeterMosmans avatar Apr 02 '24 17:04 PeterMosmans

Do you have any suggestions? I think asking the user to install packages using requirements.txt, if the they haven't already, should be good enough. It would be tedious and unnecessary for the user to install packages one by one, as mentioned in the current error message.

thebigbone avatar Apr 03 '24 08:04 thebigbone