-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
When pulling the category as shown below:
Infoboxer.wikipedia('en').category('Category:Census-designated places in California')I get the following error: 'block in list': undefined method 'first' for nil:NilClass (NoMethodError)
The stack trace points here:
infoboxer/lib/infoboxer/media_wiki.rb
Line 244 in b1770d0
| .map { |raw| Page.new(self, Parser.paragraphs(raw['revisions'].first['*'], traits), raw) } |
After doing some digging the issue seems to be that the page data for many of the pages listed in that category don't have a 'revisions' key, hence the error. I don't know enough about the MediaWiki APIs to propose a fix. But, I figured I'd start by reporting the issue here.
Thanks for your work!
Ruby Version: 3.0.4
Infoboxer Version: 0.4.0
Metadata
Metadata
Assignees
Labels
No labels