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 running keychan.initialize #293

Closed
FBisca opened this issue Dec 20, 2022 · 9 comments · Fixed by #295
Closed

Error running keychan.initialize #293

FBisca opened this issue Dec 20, 2022 · 9 comments · Fixed by #295
Assignees
Labels
bug Something isn't working

Comments

@FBisca
Copy link

FBisca commented Dec 20, 2022

Description

Suddenly the command keychain initialize started failing in our CI. I checked the libraries versions and tried to install previous one but also noticed that the android_app_bundle.py didn't change since 2021

Might be the version of Python? Any suggestions?

keychain initialize

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/keychain", line 5, in <module>
    from codemagic.tools import Keychain
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/__init__.py", line 1, in <module>
    from .android_app_bundle import AndroidAppBundle
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/android_app_bundle.py", line 35, in <module>
    class AndroidAppBundleArgument(cli.Argument):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/android_app_bundle.py", line 65, in AndroidAppBundleArgument
    KEYSTORE_PATH_REQUIRED = KEYSTORE_PATH.duplicate(argparse_kwargs={'required': True})
                             ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'duplicate'
@FBisca
Copy link
Author

FBisca commented Dec 20, 2022

Same as #294

@priitlatt
Copy link
Contributor

@FBisca please provide output of codemagic-cli-tools --version. I'm unable to reproduce it on latest version with Python 3.11.

@priitlatt
Copy link
Contributor

@adgeg, could you also check what version of tools you have? Please copy-paste the output of codemagic-cli-tools --version.

@priitlatt priitlatt added the bug Something isn't working label Dec 20, 2022
@priitlatt priitlatt self-assigned this Dec 20, 2022
@FBisca
Copy link
Author

FBisca commented Dec 20, 2022

the codemagic-cli-tools --version it's also failing with:

Run codemagic-cli-tools --version
  
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/codemagic-cli-tools", line 5, in <module>
    from codemagic.tools import CodemagicCliTools
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/__init__.py", line 1, in <module>
    from .android_app_bundle import AndroidAppBundle
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/android_app_bundle.py", line 35, in <module>
    class AndroidAppBundleArgument(cli.Argument):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/codemagic/tools/android_app_bundle.py", line 65, in AndroidAppBundleArgument
    KEYSTORE_PATH_REQUIRED = KEYSTORE_PATH.duplicate(argparse_kwargs={'required': True})
                             ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'duplicate'
Error: Process completed with exit code 1.

But I can give you the pip3 install codemagic-cli-tools output

Successfully installed cachetools-5.2.0 cffi-1.15.1 charset-normalizer-2.1.1 codemagic-cli-tools-0.36.4 cryptography-37.0.4 google-api-core-2.11.0 google-api-python-client-2.70.0 google-auth-2.15.0 google-auth-httplib2-0.1.0 googleapis-common-protos-1.57.0 httplib2-0.21.0 idna-3.4 oauth2client-4.1.3 protobuf-4.21.12 psutil-5.9.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pyjwt-2.6.0 pyparsing-3.0.9 requests-2.28.1 rsa-4.9 six-1.16.0 uritemplate-4.1.1 urllib3-1.26.13

@adgeg
Copy link

adgeg commented Dec 20, 2022

@priitlatt Yes sorry, codemagic_cli_tools-0.36.4-py3-none-any.whl. (Indeed, command is KO on Python 3.11 apparently for the same reason, and output of codemagic-cli-tools --version is 0.36.4 with Python 3.10)

@adgeg
Copy link

adgeg commented Dec 20, 2022

@FBisca : if it can temporarily help you (and that what we did), setting Python version to 3.10 fixes the issue (you may take a look at this if you use Github Action as your CI).

@priitlatt
Copy link
Contributor

@FBisca and @adgeg thanks for getting back so quickly and looks like you are actually already using latest version, which is currently 0.36.4. I'll try to reproduce the issue myself and get back to you ASAP.

@priitlatt
Copy link
Contributor

Alright, the issue is present with Python 3.11.1, but not with Python 3.11.0. Hopefully the fix won't take too long now that I can reproduce it.

@priitlatt priitlatt linked a pull request Dec 20, 2022 that will close this issue
zeitschlag added a commit to mastodon/mastodon-ios that referenced this issue Dec 20, 2022
@priitlatt
Copy link
Contributor

Fix is up with version 0.36.5 both in PyPI and under GitHub releases. Thank you @FBisca and @adgeg for reporting it!

CC @zeitschlag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants