ephraim / lcurse

Python script to have a "curse" compatible client for linux
The Unlicense
51 stars 24 forks source link

"Update catalog" hangs #20

Closed ilu33 closed 8 years ago

ilu33 commented 8 years ago

Version from 2015 had the following error: $ lcurse Traceback (most recent call last): File "/opt/lcurse/modules/waitdlg.py", line 252, in run self.retrieveListOfAddons() File "/opt/lcurse/modules/waitdlg.py", line 242, in retrieveListOfAddons lastpage = self.retrievePartialListOfAddons(page) File "/opt/lcurse/modules/waitdlg.py", line 225, in retrievePartialListOfAddons lastpage = self.parsePager(pager[0].string) IndexError: list index out of range

At least it updated some addons. I installed the latest commit but it is not working at all.

Error with latest commit: lcurse Opening http://www.curse.com/addons/wow?page=1 Traceback (most recent call last): File "/opt/lcurse/modules/waitdlg.py", line 351, in run self.retrieveListOfAddons() File "/opt/lcurse/modules/waitdlg.py", line 341, in retrieveListOfAddons lastpage = self.retrievePartialListOfAddons(page) File "/opt/lcurse/modules/waitdlg.py", line 318, in retrievePartialListOfAddons soup = BeautifulSoup(response.read(), "lxml") File "/usr/lib/python3/dist-packages/bs4/__init__.py", line 152, in __init__ % ",".join(features)) bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

A search on stackoverflow shows several reports about that error in conjunction with BeautifulSoup. I'm on debian jessie and have libxslt1.1 libxml2. Do I need libxslt1-dev?

ilu33 commented 8 years ago

I had another version from March 2016 and that one works. So it seems that by fixing one issue you created the next :-)

Anyway, thanks for maintaining this script, saves me a lot of work during patch times!

ephraim commented 8 years ago

Couldn't find a tree builder with the features you requested: lxml

Please try this: http://stackoverflow.com/questions/21322948/beautifulsoup-wont-recognize-lxml

ilu33 commented 8 years ago

I Installed libxml2-dev libxslt1-dev as indicated in that thread but it did not change anything. Why should I need developer versions of those libraries anyway?

And, since somebody in that thread mentioned it, libxml2 and libxslt1 are installed in /usr/lib/x86_64-linux-gnu/ as it should be on Debian (not in /usr/lib/). I don't know whether that matters though.

The rest of the thread seems to apply to developers only.

ephraim commented 8 years ago

You miss the pip feature lxml, so just installing the dev libraries won't do it. you will need to pip install lxml too. pip install will compile the lxml stuff. Thats why you need dev libraries. EDIT: https://pypi.python.org/pypi/pip

ilu33 commented 8 years ago

I don't think I should install a python development environment as a enduser. Especially not if the site warns that it "may leave your system in an inconsistent state." We might be completely on the the wrong track in debugging this. Does lcurse use python2 or python3? Because the error message points at python3. Is that correct?

ephraim commented 8 years ago

See first line of lcurse: https://github.com/ephraim/lcurse/blob/master/lcurse#L1

ephraim commented 8 years ago

then do a sudo apt-get install python3-lxml ...

ilu33 commented 8 years ago

Yes I just ended up with that conclusion myself and it works! Thank You.