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

Prediction downloading error #685

Closed
johngardineriv opened this issue Jan 19, 2023 · 3 comments
Closed

Prediction downloading error #685

johngardineriv opened this issue Jan 19, 2023 · 3 comments
Labels
colab AlphaFold colab issue duplicate This issue or pull request already exists

Comments

@johngardineriv
Copy link

johngardineriv commented Jan 19, 2023

I have used the Google Colab web portal to make many successful predictions, however my most recent several attempts have all ended without downloading the predicted structure for later manipulation. I get the following error message:

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
[<ipython-input-7-3e4321454653>](https://ml4d9mcuoh-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230117-060106-RC00_502511873#) in <module>
    230 
    231 # --- Download the predictions ---
--> 232 get_ipython().system('zip -q -r {output_dir}.zip {output_dir}')
    233 files.download(f'{output_dir}.zip')

2 frames
[/usr/local/lib/python3.8/dist-packages/google/colab/_shell.py](https://ml4d9mcuoh-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230117-060106-RC00_502511873#) in system(self, *args, **kwargs)
     93       kwargs.update({'also_return_output': True})
     94 
---> 95     output = _system_commands._system_compat(self, *args, **kwargs)  # pylint:disable=protected-access
     96 
     97     if pip_warn:

[/usr/local/lib/python3.8/dist-packages/google/colab/_system_commands.py](https://ml4d9mcuoh-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230117-060106-RC00_502511873#) in _system_compat(shell, cmd, also_return_output)
    434   # is expected to call this function, thus adding one level of nesting to the
    435   # stack.
--> 436   result = _run_command(
    437       shell.var_expand(cmd, depth=2), clear_streamed_output=False)
    438   shell.user_ns['_exit_code'] = result.returncode

[/usr/local/lib/python3.8/dist-packages/google/colab/_system_commands.py](https://ml4d9mcuoh-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230117-060106-RC00_502511873#) in _run_command(cmd, clear_streamed_output)
    161   locale_encoding = locale.getpreferredencoding()
    162   if locale_encoding != _ENCODING:
--> 163     raise NotImplementedError(
    164         'A UTF-8 locale is required. Got {}'.format(locale_encoding))
    165 

NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968
SEARCH STACK OVERFLOW

I have already tried fiddling with my browser's download permissions, but that has not remedied the issue. Thank you for your assistance.

@Augustin-Zidek Augustin-Zidek added the colab AlphaFold colab issue label Jan 19, 2023
@Augustin-Zidek
Copy link
Collaborator

Augustin-Zidek commented Jan 19, 2023

Could you try replacing

!zip -q -r {output_dir}.zip {output_dir}

from cell 5 with:

import shutil
shutil.make_archive(output_dir, 'zip', output_dir)

See also #483

@Augustin-Zidek Augustin-Zidek added the duplicate This issue or pull request already exists label Jan 19, 2023
@Augustin-Zidek
Copy link
Collaborator

Fixed in 0d9a24b. Thanks for reporting!

@johngardineriv
Copy link
Author

Working smoothly now. Thank you muchly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
colab AlphaFold colab issue duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants