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

Fix data format in semantic scholar translator #1576

Merged
merged 1 commit into from Mar 5, 2018

Conversation

Projects
None yet
3 participants
@GuyAglionby
Contributor

GuyAglionby commented Mar 5, 2018

Semantic Scholar changed their website format so the data is now base64 and URI encoded, so I have amended the translator to deal with this.

Only comment is that Scaffold (via Zotero 5.0.35.1, Scaffold 3.3.0) doesn't have atob as a function so the tests fail, though I have manually tested the changes in Chrome.

Thanks!

@adam3smith

This comment has been minimized.

Show comment
Hide comment
@adam3smith

adam3smith Mar 5, 2018

Collaborator

are you sure the problem is that Scaffold doesn't have atob? That'd be very odd -- it should have all javascript available in Firefox 54, which certainly includes atob.
I suspect the tests are failing because the built-in browser can't handle the semantic scholar website.

Collaborator

adam3smith commented Mar 5, 2018

are you sure the problem is that Scaffold doesn't have atob? That'd be very odd -- it should have all javascript available in Firefox 54, which certainly includes atob.
I suspect the tests are failing because the built-in browser can't handle the semantic scholar website.

@adam3smith adam3smith merged commit ef29321 into zotero:master Mar 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adam3smith

This comment has been minimized.

Show comment
Hide comment
@adam3smith

adam3smith Mar 5, 2018

Collaborator

in any way, this is fine, thanks!

Collaborator

adam3smith commented Mar 5, 2018

in any way, this is fine, thanks!

@GuyAglionby

This comment has been minimized.

Show comment
Hide comment
@GuyAglionby

GuyAglionby Mar 5, 2018

Contributor

I get the below error, but it may be an artefact of the browser not loading the website (which is new & strange behaviour)

14:54:35 TranslatorTester: Running 1 test for Semantic Scholar
14:54:35 TranslatorTester: Running Semantic Scholar Test 1
14:54:36 TranslatorTester: Translating https://www.semanticscholar.org/paper/Foundations-of-Statistical-Natural-Language-Proces-Manning-Sch%C3%BCtze/06fd7d924d499fbc62ccbcc2e458fb6c187bcf6f
14:54:36 Translation using Semantic Scholar failed: 
         string => ReferenceError: atob is not defined
         stack => parseDocument/<@Semantic Scholar:95:5
...

Thanks for the merge :)

Contributor

GuyAglionby commented Mar 5, 2018

I get the below error, but it may be an artefact of the browser not loading the website (which is new & strange behaviour)

14:54:35 TranslatorTester: Running 1 test for Semantic Scholar
14:54:35 TranslatorTester: Running Semantic Scholar Test 1
14:54:36 TranslatorTester: Translating https://www.semanticscholar.org/paper/Foundations-of-Statistical-Natural-Language-Proces-Manning-Sch%C3%BCtze/06fd7d924d499fbc62ccbcc2e458fb6c187bcf6f
14:54:36 Translation using Semantic Scholar failed: 
         string => ReferenceError: atob is not defined
         stack => parseDocument/<@Semantic Scholar:95:5
...

Thanks for the merge :)

dstillman added a commit to zotero/zotero that referenced this pull request Mar 5, 2018

@dstillman

This comment has been minimized.

Show comment
Hide comment
@dstillman

dstillman Mar 5, 2018

Member

Translators in the Zotero client run in a sandbox, which didn't have atob. I've added it for the next version.

Member

dstillman commented Mar 5, 2018

Translators in the Zotero client run in a sandbox, which didn't have atob. I've added it for the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment