Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SemanticMediaWikiImporter.php not ending when all data is exported #4

Closed
jthingelstad opened this issue Jul 26, 2013 · 4 comments
Closed

Comments

@jthingelstad
Copy link

Now that issue #1 is closed I reran the importer to generate data. It should have stopped with 21,516 rows (http://wikinosh.com/wiki/Category:Food) but the file went to 22,900 rows and then I CTRL-C'd the task.

http://wikinosh.com/miga/apps/wikinosh/Food.csv

Looking at the contents of that file, it seems to not be entirely sequential. Actually, doing a

grep "Agar Seaweed" Food.csv

on that CSV shows the same data over and over. Ugh. Not sure what is causing this issue, it's likely some SMW issue. The net result is that the importer never stops and runs forever.

If you want to test yourself, this is my import settings:

<?php
$gImportFileName = "Food.csv";
$gImportSpecialAskURL = "http://wikinosh.com/wiki/Special:Ask";
$gImportCategoryName = "Category:Food";
$gImportFields = array(
        'Name' => '_name',
        'Calories' => 'Has calories',
        'Fat' => 'Has fat',
        'Carbohydrates' => 'Has carbohydrates',
        'Protein' => 'Has protein'
);
@yaronkoren
Copy link
Owner

Yes, that's pretty bad - it looks like Special:Ask simply ignores values of "offset" higher than 5000. I don't know if there's any easy way to fix that. If not, you could always use the standard MediaWiki importer, as sad as that sounds...

@jthingelstad
Copy link
Author

Oi... from SMW_QueryProcessor.php (line 611)

            $params['offset'] = array(
                    'type' => 'integer',
                    'default' => 0,
                    'negatives' => false,
                    'upperbound' => 5000 // TODO: make setting
            );

So, yeah. :-(

@jthingelstad
Copy link
Author

There is an existing bugzilla issue on this.

https://bugzilla.wikimedia.org/show_bug.cgi?id=49203

@yaronkoren
Copy link
Owner

Thanks for the good detective work! I updated the docs accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants