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

Unable to pull source #91

Closed
jordimas opened this issue Oct 1, 2022 · 4 comments
Closed

Unable to pull source #91

jordimas opened this issue Oct 1, 2022 · 4 comments

Comments

@jordimas
Copy link

jordimas commented Oct 1, 2022

Hello!

tx version 0.31. If I execute these commands:

tx init 
tx add remote --file-filter 'translations/<project_slug>.<resource_slug>/<lang>.<ext>' "https://www.transifex.com/otf/briar/"
tx pull  -l ca_ES

It works perfectly. Once I try to also pull the sources (-s) doing:

tx pull --s  -l ca_ES

I get this error:

briar.briar-desktop - 404, not_found: No `Project` resource found with the identifier `o:otf:p:briar`
briar.briar-fact-sheetjson - 404, not_found: No `Project` resource found with the identifier `o:otf:p:briar`
briar.briar-gtk-meta-pot - 404, not_found: No `Project` resource found with the identifier `o:otf:p:briar`
briar.briar-gtk-pot - 404, not_found: No `Project` resource found with the identifier `o:otf:p:briar`
briar.briar-quick-start-guide - 404, not_found: No `Project` resource found with the identifier `o:otf:p:briar`

I was expecting to be able to pull the resources like in the old client.

Let me know if you need any other detail

@kbairak
Copy link

kbairak commented Oct 5, 2022

Hey @jordimas ,

A first observation: your second pull command is wrong:

-tx pull --s -l ca_ES
+tx pull -s -t -l ca_ES

I don't know if changing it will fix your issue. In any case, the error messages are deeply misleading so we will take a deeper look.

@kbairak
Copy link

kbairak commented Oct 5, 2022

Hey @jordimas ,

I still can't figure out what's wrong. I tried reproducing your issue and couldn't. The weird thing is that the error message you are getting is from a call to the API that looks like this GET /projects/o:otf:p:briar. However, in the code, this API call happens after an API call to GET /resources/o:otf:p:briar:r:briar-desktop. This means that the first API call (the one to /resources/...) succeeded while the second one (the one to /projects/...) failed. I cannot imagine a reason why this could happen. If the API allows you to see a resource, it should allow you to see its parent project.

There is another issue with your tx invocations. It doesn't make sense to use the -l/--languages flag without the -t/--translations flag. If you do it (something like tx pull -l ca_ES or tx pull -s -l ca_ES), the pull command will be in "source mode" and the -l flag will be ignored.

This also means that your two examples, tx pull -l ca_ES and tx pull --s -l ca_ES should behave identically which makes the fact that they have different results super-weird.

We can implement a check in the pull command to abort and let the user know about this. In fact, such a check exists in the tx push command; for some reason we neglected to put it in the pull command. However, this will not solve your issue.

Can you please try the amended commands to see if they work, otherwise can you share your .tx/config file in case there are any hints there?

Thanks

@jordimas
Copy link
Author

jordimas commented Oct 5, 2022

Thanks.

Doing:

tx pull -s -t -l ca_ES

Fixes the problem. I was missing the -t

@jordimas
Copy link
Author

Closing this then, thanks

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