Coder Social home page Coder Social logo

IndexError about lcurse HOT 10 CLOSED

ephraim avatar ephraim commented on August 19, 2024
IndexError

from lcurse.

Comments (10)

ephraim avatar ephraim commented on August 19, 2024

Hey,

what addon do you try to add?

from lcurse.

ephraim avatar ephraim commented on August 19, 2024

please try again with the current commits pulled.

from lcurse.

ephraim avatar ephraim commented on August 19, 2024

btw. if you find anything not translated correctly, I would be glad to get a proper translation for en_US LANG.

from lcurse.

savirien avatar savirien commented on August 19, 2024

Thanks for the reply. As of now I get this:

WARNING: gui translation file could not be found: /home/greg/Downloads/lcurse-master/translations/en_US.qm
Traceback (most recent call last):
File "/home/greg/Downloads/lcurse-master/modules/waitdlg.py", line 331, in run
self.retrieveListOfAddons()
File "/home/greg/Downloads/lcurse-master/modules/waitdlg.py", line 321, in retrieveListOfAddons
lastpage = self.retrievePartialListOfAddons(page)
File "/home/greg/Downloads/lcurse-master/modules/waitdlg.py", line 304, in retrievePartialListOfAddons
lastpage = self.parsePager(pager[0].string)
IndexError: list index out of range

I am by no means a py expert. What I've tried thus far is changing waitdlg.py line 300 to:
response = self.opener.open("http://www.curse.com/addons/wow?page=" + str(page))

Thought the curse site may have changed their URL scheme, but I still get the same errors.

It looks like (at least to me) that something is not initialized right in line 304 of waitdlg.py but I don't have the knowledge to fix it.

Thanks again.

from lcurse.

ephraim avatar ephraim commented on August 19, 2024

You didn't pull the latest changes, isn't it?

from lcurse.

savirien avatar savirien commented on August 19, 2024

Sorry for the late reply, that was with the changes.

from lcurse.

hotice avatar hotice commented on August 19, 2024

It doesn't work for me either, using the latest GIT. This is what I get under Ubuntu 16.04:

QXcbWindow: Unhandled client message: "_GTK_LOAD_ICONTHEMES"
/usr/lib/python3/dist-packages/bs4/__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "lxml")

  markup_type=markup_type))
Traceback (most recent call last):
  File "/opt/lcurse/modules/waitdlg.py", line 331, in run
    self.retrieveListOfAddons()
  File "/opt/lcurse/modules/waitdlg.py", line 321, in retrieveListOfAddons
    lastpage = self.retrievePartialListOfAddons(page)
  File "/opt/lcurse/modules/waitdlg.py", line 304, in retrievePartialListOfAddons
    lastpage = self.parsePager(pager[0].string)
IndexError: list index out of range

from lcurse.

ephraim avatar ephraim commented on August 19, 2024

sorry my bad. Did forget one file to add to the commit. Please pull and try again. Thanks!

from lcurse.

savirien avatar savirien commented on August 19, 2024

Looks like things are working now. I did add a small sleep delay into your function in waitdlg.py

def retrieveListOfAddons(self):
    page = 1
    lastpage = 1
    self.sem.acquire()
    lastpage = self.retrievePartialListOfAddons(page)
    page += 1
    self.retrievedLastpage.emit(lastpage)

    while page <= lastpage:
        sleep(0.5)
        self.sem.acquire()
        start_new_thread(self.retrievePartialListOfAddons, (page,))
        page += 1

The workers were requesting so fast it was causing urllib to timeout from too many connections left open. I believe this is an issue with my ISP rather than with your code.

Thank you for getting lcurse working again!

from lcurse.

hotice avatar hotice commented on August 19, 2024

Now it works here too. Thanks!

from lcurse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.