Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

ffi.callback() error on M1 Mac #80

Open
3 tasks done
mnbpdx opened this issue Oct 13, 2022 · 1 comment
Open
3 tasks done

ffi.callback() error on M1 Mac #80

mnbpdx opened this issue Oct 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mnbpdx
Copy link

mnbpdx commented Oct 13, 2022

Prerequisite

  • I have updated to the latest version,
  • (If applicable) I have ensured the password is correct with the flag -v 0,
  • I have searched the opened and closed issues for a duplicate,

Describe the bug

I'm getting an error on my M1 mac when calling zoomdl with (presumably) normal parameters. It appears to be related to the use of "old style" CFFI callbacks that my mac doesn't like. Could be a general OSX issue, could be just M1, idk. This is a common issue I guess, here's an issue from another project. If I understand correctly, fixing it will require some refactoring to use the recommended extern “Python” callbacks. Here's the url listed in the error itself.

To Reproduce

  1. Call zoomdl with -u flag and parameter on M1 mac.
  2. See error

Expected behavior

Expect zoomdl to begin downloading Zoom video.

URL (opt)

I used an SSO access zoom file, followed the instructions and used the --cookies flag. I retried it without the --cookies flag and it gave me the same error, my guess is that it didn't get to the authentication step yet, so SSO access is irrelevant.

I can provide the URL via DM if you're interested, though I doubt it will help, its just an SSO accessed school lecture, that you'd need credentials for.

Logs

zoomdl -u 'https://pdx.zoom.us/rec/play/HqEOeGIQFjFzzRHdaPtD9PnDhb4Gxx7SteHxBVxz3Hy5Vm57O-a-l_djI6_2u-Lz5TyvUMIsqcAeFkRF.cxBz3KbU2JZyZgiH?continueMode=true' -v 0
Using standard Windows UA
Changing page to https://pdx.zoom.us/rec/play/HqEOeGIQFjFzzRHdaPtD9PnDhb4Gxx7SteHxBVxz3Hy5Vm57O-a-l_djI6_2u-Lz5TyvUMIsqcAeFkRF.cxBz3KbU2JZyZgiH?continueMode=true
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/zoomdl/__main__.py", line 20, in <module>
  File "/usr/local/bin/zoomdl/zoom_dl/__init__.py", line 19, in main
  File "/usr/local/bin/zoomdl/zoom_dl/zoomdl.py", line 343, in download
  File "/usr/local/bin/zoomdl/zoom_dl/zoomdl.py", line 75, in _change_page
  File "/usr/local/bin/zoomdl/requests/sessions.py", line 543, in get
  File "/usr/local/bin/zoomdl/requests/sessions.py", line 530, in request
  File "/usr/local/bin/zoomdl/requests/sessions.py", line 643, in send
  File "/usr/local/bin/zoomdl/requests/adapters.py", line 439, in send
  File "/usr/local/bin/zoomdl/urllib3/connectionpool.py", line 670, in urlopen
  File "/usr/local/bin/zoomdl/urllib3/connectionpool.py", line 381, in _make_request
  File "/usr/local/bin/zoomdl/urllib3/connectionpool.py", line 978, in _validate_conn
  File "/usr/local/bin/zoomdl/urllib3/connection.py", line 343, in connect
  File "/usr/local/bin/zoomdl/urllib3/util/ssl_.py", line 290, in create_urllib3_context
  File "/usr/local/bin/zoomdl/urllib3/contrib/pyopenssl.py", line 438, in verify_mode
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/OpenSSL/SSL.py", line 1128, in set_verify
    self._verify_helper = _VerifyHelper(callback)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/OpenSSL/SSL.py", line 359, in __init__
    self.callback = _ffi.callback(
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks

Versions (please complete the following information):

  • OS: macOS 12.6 (21G115)
  • Python Version: 3.9
  • Hardware: (excerpt from System Information)
  Model Name:	        MacBook Pro
  Model Identifier:	MacBookPro18,1
  Chip:	                Apple M1 Pro

Thanks! Love the project.

@mnbpdx mnbpdx added the bug Something isn't working label Oct 13, 2022
@RogerHuauya
Copy link

I found this forum and I uninstalled pyopenssl and it worked form
Versions:

pip3 uninstall pyopenssl

OS: macOS 13.0 Ventura
Python Version: 3.9
Hardware: Macbook pro 16" M1 max

https://lightrun.com/answers/pyca-pyopenssl-memoryerror-cannot-allocate-writeexecute-memory-for-fficallback

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

No branches or pull requests

3 participants