xsssniper icon indicating copy to clipboard operation
xsssniper copied to clipboard

Check availability of lxml

Open fgeek opened this issue 9 years ago • 7 comments

Currently if mechanize is missing xsssniper will say:

[X] Please install mechanize module:
    http://wwwsearch.sourceforge.net/mechanize/

But if lxml is missing it will say:

Traceback (most recent call last):
  File "xsssniper.py", line 6, in <module>
    from core.engine import Engine
  File "/home/hsalo/xsssniper/core/engine.py", line 24, in <module>
    from core.domscanner import DOMScanner
  File "/home/hsalo/xsssniper/core/domscanner.py", line 11, in <module>
    from lxml import etree
ImportError: No module named lxml

Maybe xsssniper should also give pip install -commands rather than per project URLs, but that is design decision. Also the import errors are checked several times. Is there a reason for that?

fgeek avatar May 03 '15 13:05 fgeek

I think it's just been a bad design decision. Nowadays I'd like more to put a requirements.txt and have the user go trough it to met the dependencies.

gbrindisi avatar Jun 04 '15 09:06 gbrindisi

Yes. Using requirements.txt is a good option and if "Please install x module" is used then there should be same mechanism for all components. General stacktrace when module is missing is pretty obvious too.. I can create a pull request for requirements.txt change.

fgeek avatar Jun 04 '15 09:06 fgeek

Using requirements.txt is a good way for this I would say.

@gbrindisi Are you still actively maintaining this project?

tholu avatar Apr 17 '18 11:04 tholu

I am not actively developing, but I can review and merge pull requests :+1:

gbrindisi avatar Apr 17 '18 14:04 gbrindisi

@gbrindisi Thanks for your quick answer, packaging/releasing/publishing it for pip (#2) would be the next best thing to increase usage and pull requests.

tholu avatar Apr 17 '18 14:04 tholu

@tholu I will put this in my backlog

gbrindisi avatar Apr 23 '18 07:04 gbrindisi

Yes, I successfully get the output of the project Thank you.

mtechmycourse avatar Feb 19 '20 08:02 mtechmycourse