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

Enity SiteLink URL is always null #76

Open
FaFre opened this issue Dec 1, 2020 · 1 comment
Open

Enity SiteLink URL is always null #76

FaFre opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels

Comments

@FaFre
Copy link
Contributor

FaFre commented Dec 1, 2020

For some reason the URL for SIteLink's is always null.

var entity = new Entity(_wikiDataSite, "Q1022");
                await entity.RefreshAsync(
                    EntityQueryOptions.FetchAllProperties
                );

image

I also tried around with EntityQueryOptions e.g. setting only FetchSiteLinkURL and so on, but I couldn't get it working. Is this a library Problem, or has it something to do with the Wiki-Site I'm querying? (Wikidata)

@CXuesong CXuesong self-assigned this Dec 5, 2020
@CXuesong CXuesong added the bug label Dec 5, 2020
@CXuesong
Copy link
Owner

CXuesong commented Dec 5, 2020

That's interesting since there is unit test covering this part

ShallowTrace(entity);
Assert.Equal("test entity " + rand, entity.Labels["en"]);
Assert.Contains("test", entity.Aliases["en"]);
Assert.Contains("This is a test entity", entity.Descriptions["en"]);
Assert.Contains("此实体仅用于测试之用。", entity.Descriptions["zh"]);
Assert.Equal("Foo", entity.SiteLinks["testwiki"].Title);

Can you perhaps check the actual response from MW? E.g.

https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbgetentities&format=json&ids=Q1234&props=sitelinks

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

No branches or pull requests

2 participants