why the pageId could be found, but the page couldn't be found?

13 views
Skip to first unread message

imn...@gmail.com

unread,
Dec 20, 2016, 12:35:42 AM12/20/16
to jwpl-users
private static void DFSCategoryTree(Category category) throws WikiApiException
{
// TODO Auto-generated method stub
if (!vCategories.contains(category.getTitle()))
{
System.out.println(category.getTitle());
System.out.println(category.getNumberOfPages());
vCategories.add(category);
for (Integer pageId : category.getArticleIds())
{
if (!vPageIds.contains(pageId))
{
System.out.println("pageid is :" + pageId);
}
}
for (Page page : category.getArticles())
{
if (!vPageIds.contains(page))
{
System.out.println("pageid is :" + page);
}
}

for (Category sonCategory : category.getChildren())
{
DFSCategoryTree(sonCategory);
}
}
return;
}


output result:

2
pageid is :68994
pageid is :4569724
Exception in thread "main" de.tudarmstadt.ukp.wikipedia.api.exception.WikiPageNotFoundException: No page with page id 4569724 was found.
at de.tudarmstadt.ukp.wikipedia.api.Page.fetchByPageId(Page.java:178)
at de.tudarmstadt.ukp.wikipedia.api.Page.<init>(Page.java:90)
at de.tudarmstadt.ukp.wikipedia.api.Wikipedia.getPage(Wikipedia.java:146)
at de.tudarmstadt.ukp.wikipedia.api.Category.getArticles(Category.java:299)
at iie.ac.cn.zjp.ShowCategoryInfo.DFSCategoryTree(ShowCategoryInfo.java:76)
at iie.ac.cn.zjp.ShowCategoryInfo.DFSCategoryTree(ShowCategoryInfo.java:86)
at iie.ac.cn.zjp.ShowCategoryInfo.DFSCategoryTree(ShowCategoryInfo.java:86)
at iie.ac.cn.zjp.ShowCategoryInfo.showCategoryInfo(ShowCategoryInfo.java:49)
at iie.ac.cn.zjp.ShowCategoryInfo.main(ShowCategoryInfo.java:104)
Message has been deleted

Torsten Zesch

unread,
Mar 23, 2018, 5:25:47 PM3/23/18
to jwpl-users
I think this wasn't solved.
Is this related to your problem from the other thread?


2018-03-21 15:26 GMT+01:00 Xiaochen Zheng <hellozhen...@gmail.com>:
Hi, I know this is a very old post, just in case you still remember something.
I am a new user of JWPL and got the same problem. Did you find the cause of this error? Did you solve it in the end?
Thanks a lot.
Xiaochen

在 2016年12月20日星期二 UTC+1上午6:35:42,imn...@gmail.com写道:

--
You received this message because you are subscribed to the Google Groups "jwpl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jwpl+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages