question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MemoryError: Cannot allocate write+execute memory for ffi.callback()

See original GitHub issue

For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks

Found originally here: https://github.com/scrapy/scrapy/issues/4117 Seems like pyOpenSSL issue, that’s why creating it here.

Any advice or workaround is appreciated.

Traceback:

2019-10-31 20:24:51 [scrapy.downloadermiddlewares.robotstxt] ERROR: Error downloading <GET https://xxx.yyy/robots.txt>: 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
Traceback (most recent call last):
.... skipped as non-relevant ...
 File "/home/scrapy/env/local/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1709, in _makeContext
    ctx.set_verify(verifyFlags, _verifyCallback)
  File "/home/scrapy/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1103, in set_verify
    self._verify_helper = _VerifyHelper(callback)

OS:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:12
  • Comments:55 (6 by maintainers)

github_iconTop GitHub Comments

38reactions
ImAliencommented, Oct 23, 2021

encounter the same problems on m1 mac

32reactions
upuilcommented, Dec 21, 2021

pip3 uninstall pyopenssl may get around to this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scrapy on M1 Mac: MemoryError - Stack Overflow
It would return me: MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this.
Read more >
I am receiving a MemoryError: Cannot allocate write+execute ...
I am receiving a MemoryError: Cannot allocate write+execute memory for ffi.callback(). when trying to set up snowpark on a mac M1 in jupyter ......
Read more >
Why am I seeing the error "MemoryError: Cannot allocate write ...
Why am I seeing the error "MemoryError: Cannot allocate write+execute memory for ffi.callback()" when fetching subscriptions in Ansible Tower.
Read more >
关于使用scrapy报错之MemoryError: Cannot allocate ... - 简书
MemoryError : Cannot allocate write+execute memory for ffi.callback(). 搜索了各种问题来源,解决方案有说是Python版本的问题,也有说是requests库 ...
Read more >
M1 Mac cffi error? : r/scrapy - Reddit
MemoryError : Cannot allocate write+execute memory for ffi.callback(). ... see https://cffi.readthedocs.io/en/latest/using.html#callbacks.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found