Problems when using Github action to push source files

Update update.sh · mendax1234/6940Swerve-docs@5299d3d (github.com)
Above is the wrong action.

And l try using these lines of code to push and pull automatically. l also have a file to lock-translations. However, it seems that once l run the action, it locks all of my translations.

mendax1234/6940Swerve-docs: FRC Team 6940’s Swerve Documentation Powered by Read the Docs (github.com)
And here is my project, can anyone help me?

Note: l used the python API in the past, and now l try changing to the new API 3.0. It seems that everything goes well on with the old API and l have changed the related things according to the new API.

1 Like

Hello Mendax,

Thank you for posting your question.
I took a look to your python script ( lock-translations.py), Could you print this 3 variables and share the output with me ? (unused_resources) (remote_resources, local_resources), It seems that you are not filtering well and sending all resources IDs to def lock_resources. Also if you could debug the whole script would be awesome.

Thanks in advance
Cesar

1 Like

Thanks for your advice! l have printed all of them

remote resources: docs--about--about
remote resources: docs--acknowledgements--acknowledgements
remote resources: docs--contributing--build-instructions
remote resources: docs--contributing--contributing-guidelines
remote resources: docs--contributing--how-it-works
remote resources: docs--contributing--index
remote resources: docs--contributing--style-guide
remote resources: docs--contributing--top-contributors
remote resources: docs--contributing--top-translators
remote resources: docs--contributing--translation
remote resources: docs--contributing--write-articles
remote resources: docs--epilogue--epilogue
remote resources: docs--hardware-info--hardware-info
remote resources: docs--software-info-team1684--disclaimer
remote resources: docs--software-info-team1684--integrating-other-PIDs--drive-straight
remote resources: docs--software-info-team1684--integrating-other-PIDs--gamepiece-centric
remote resources: docs--software-info-team1684--integrating-other-PIDs--goal-centric
remote resources: docs--software-info-team1684--integrating-other-PIDs--index
remote resources: docs--software-info-team1684--integrating-other-PIDs--PIDF-loops
remote resources: docs--software-info-team1684--other-miscs--index
remote resources: docs--software-info-team1684--overview
remote resources: docs--software-info-team1684--swerve-in-auton--how-it-should-work
remote resources: docs--software-info-team1684--swerve-in-auton--index
remote resources: docs--software-info-team1684--swerve-in-auton--the-math
remote resources: docs--software-info-team1684--swerve-in-teleop--how-it-should-work
remote resources: docs--software-info-team1684--swerve-in-teleop--index
remote resources: docs--software-info-team1684--swerve-in-teleop--the-math
remote resources: docs--software-info-team6940--index
remote resources: index
local resources: docs--about--about
local resources: docs--acknowledgements--acknowledgements
local resources: docs--contributing--build-instructions
local resources: docs--contributing--contributing-guidelines
local resources: docs--contributing--how-it-works
local resources: docs--contributing--index
local resources: docs--contributing--style-guide
local resources: docs--contributing--top-contributors
local resources: docs--contributing--top-translators
local resources: docs--contributing--translation
local resources: docs--contributing--write-articles
local resources: docs--epilogue--epilogue
local resources: docs--hardware-info--hardware-info
local resources: docs--software-info-team1684--disclaimer
local resources: docs--software-info-team1684--integrating-other-PIDs--PIDF-loops
local resources: docs--software-info-team1684--integrating-other-PIDs--drive-straight
local resources: docs--software-info-team1684--integrating-other-PIDs--gamepiece-centric
local resources: docs--software-info-team1684--integrating-other-PIDs--goal-centric
local resources: docs--software-info-team1684--integrating-other-PIDs--index
local resources: docs--software-info-team1684--other-miscs--index
local resources: docs--software-info-team1684--overview
local resources: docs--software-info-team1684--swerve-in-auton--how-it-should-work
local resources: docs--software-info-team1684--swerve-in-auton--index
local resources: docs--software-info-team1684--swerve-in-auton--the-math
local resources: docs--software-info-team1684--swerve-in-teleop--how-it-should-work
local resources: docs--software-info-team1684--swerve-in-teleop--index
local resources: docs--software-info-team1684--swerve-in-teleop--the-math
local resources: docs--software-info-team6940--index
local resources: index
All resources are locked or in use!

It seems that it works now, but at the first time l tried this yesterday, it locked all my resources. l think l will try modifying one of my resources to have a further test of it.

Hello Mendax,

Please let us know how it goes or if you encounter any further issues :slight_smile:

Best Regards
Cesar

+ tx pull -l zh_CN --mode onlyreviewed --use-git-timestamps

[289](https://github.com/mendax1234/6940Swerve-docs/actions/runs/3237580258/jobs/5304812369#step:7:290)It doesn't make sense to use the '--all' or '--language' flag without the '--translation' flag

[290](https://github.com/mendax1234/6940Swerve-docs/actions/runs/3237580258/jobs/5304812369#step:7:291)Error: Process completed with exit code 1.

It seems that transifex has updated its API?

Hello @mendax1234,

We are about to deprecate the API versions namely API v2 and v2.5, to make way for the more usable and maintainable API v3.
As of Nov 30, 2022, API versions, 2 and 2.5 will no longer be operational and relevant requests will begin to fail but for today everything should work as always.
Let us know if you encounter any specific issue

Best Regards
Cesar

Yeah, l have already turned to use API v3 a month ago. However, some days earlier, l found that the code which worked well on API v3 now didn’t work well. So, l go to your Github repo and found that some changes had been made, l guess that this caused my previous code not worked.

Here is my issue on Github, can you help me with it? Thanks!

To summarize this problem, that how to deal with this : It doesn't make sense to use the '--all' or '--language' flag without the '--translation' flag

By the way, I added the “-t” option to my original code and corrected the problem. Additionally, it is proven that the version change of Transifex is what causes the issue.

This is what I observed.

So another issue is how to use the most stable Transifex cli version rather than constantly utilizing the most recent.

Hello @mendax1234,

I see, Thank you for taking the time to let us know the issue and your fix, glad that everything is working now :slight_smile:

Regarding this matter our dev team is already aware of this situation and have also shared the fix:

Please let us know if you encounter any further issues.

Best Regards
Cesar

Thank you, but now it will also make the same mistake if I delete the -t,.

Hello @mendax1234,

I apologize for the delay.
So let me try to understand something, Now you get the same error WITH and WITH OUT “-t” ?
Could you confirm, the version of CLI you are using and the full command you are using ?

Thanks in advance
Cesar

Hi, thanks for your reply! Your development team has already fixed this issue.

Great!,
If anything else comes up please let us know :slight_smile:
Best Regards
Cesar