sharnett / presentr

a glitchy and beautiful slide show presentation generator
1 stars 1 forks source link

wiki.py crashes for certain tags #5

Closed obsjames closed 12 years ago

sharnett commented 12 years ago

Examples?

obsjames commented 12 years ago

thugs ValueError: sample larger than population

tigers KeyError: 'query'

karma sutra HTTPError: HTTP Error 400: Bad request

On Tue, Oct 2, 2012 at 9:50 AM, Sean Harnett notifications@github.comwrote:

Examples?

— Reply to this email directly or view it on GitHubhttps://github.com/sharnett/james/issues/5#issuecomment-9071333.

obsjames commented 12 years ago

karma sutra fails because i can't spell. ignore that one.

sharnett commented 12 years ago

thug and tiger work. There has to be a wikipedia page for that exact spelling. The 'sample larger' error should have been fixed a while ago, do you have the latest code?

We can catch 'query' errors and give a friendly response on the web page.

nmyk commented 12 years ago

I'm gonna work on an overhaul of the parsing that should reduce the frequency of 'sample larger' errors by a lot

sharnett commented 12 years ago

The sample larger error should never happen. At worst, for really short articles, a couple of 'james' will be put into the mix.

nmyk commented 12 years ago

oh, right.

what i meant was, i'll slaughter as many jameses as i can

On Oct 2, 2012, at 2:39 PM, Sean Harnett wrote:

The sample larger error should never happen. At worst, for really short articles, a couple of 'james' will be put into the mix.

— Reply to this email directly or view it on GitHub.

obsjames commented 12 years ago

You do know that I'm standing right here.

On Tue, Oct 2, 2012 at 2:44 PM, nmyk notifications@github.com wrote:

oh, right.

what i meant was, i'll slaughter as many jameses as i can

On Oct 2, 2012, at 2:39 PM, Sean Harnett wrote:

The sample larger error should never happen. At worst, for really short articles, a couple of 'james' will be put into the mix.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/sharnett/james/issues/5#issuecomment-9082073.

obsjames commented 12 years ago

Should this be closed?

nmyk commented 12 years ago

yeah

i think improvement of wiki parsing will be kind of an ongoing thing

On Oct 3, 2012, at 2:57 PM, obsjames wrote:

Should this be closed?

— Reply to this email directly or view it on GitHub.

obsjames commented 12 years ago

'ninja' gave me a query error. Can we clean up the wiki parsing?

sharnett commented 12 years ago

I use 'ninja' all the time and have never gotten a query error. My suggestion for this is to specifically catch query errors and fail gracefully on those. Just tell the user to try again, or try a different topic.

sharnett commented 12 years ago

Okay query errors are now dealt with. It won't crash if we type in something wikipedia doesn't like. Will close this, but at some point we might want to consider doing a wiki search instead of going straight to the page.

obsjames commented 12 years ago

'mathematics' crashes presentr.

sharnett commented 12 years ago

Make a new issue with more details. This doesn't appear to be wiki.py, I think tumblr doesn't return enough photos. Should think of a graceful way to handle it.