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

Error: API returned: Daily Limit Exceeded - is there a temp file? #45

Open
TimHenrichsen opened this issue Jun 26, 2018 · 1 comment
Open

Comments

@TimHenrichsen
Copy link

I tried to use the package to translate some text. I checked the nchar amount, which is within the daily limit (https://cloud.google.com/translate/quotas)

sum(nchar(articles_to_translate))
[1] 1999332

I then used the command

articles_translated <- gl_translate(articles_to_translate, 
                                    target = "en",
                                    format = "text",
                                    source = "it")

which seemed to work until I received a daily limit exceeded error. Now Google already billed me, but no results were returned in R.
Is there a way to still get the result for example from temporary files somewhere on my harddisk?

Thanks for your help, sessioninfo below:

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] googleLanguageR_0.2.0 rDNA_2.1.6            dplyr_0.7.5           rJava_0.9-9     
@MarkEdmondson1234
Copy link
Collaborator

Hmm sorry about that, thats a tough one to test for. If you need to do that many per day regularly definitely apply for a bigger quota, which I see can be raised to unlimited.

It thought maybe that nchar() isn't exactly the number of characters it uses to judge the quota, but it seems from here multi-byte characters etc. are fine. It may be worth asking on that forum if the 2million limit is an exact one.

The results are not stored in temporary files as it stands now, but I will look at adding code that will return what has been translated so far to help avoid such situations in the future.

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