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

MemoryError #10

Open
amitu opened this issue Jun 17, 2017 · 1 comment
Open

MemoryError #10

amitu opened this issue Jun 17, 2017 · 1 comment

Comments

@amitu
Copy link
Owner

amitu commented Jun 17, 2017

python(5211,0x700003a92000) malloc: *** mach_vm_map(size=745667699670638592) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Internal Server Error: /apple-touch-icon-precomposed.png
Traceback (most recent call last):
  File "/Users/amitu/.pyenv/versions/acko/lib/python3.5/site-packages/encrypted_id/__init__.py", line 79, in decode
    if crc != binascii.crc32(bytes(the_id)) & 0xffffffff:
MemoryError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/amitu/.pyenv/versions/acko/lib/python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/Users/amitu/.pyenv/versions/acko/lib/python3.5/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/Users/amitu/acko/claimator/src/dj/acko/middlewares.py", line 68, in process_request
    tracker = Tracker.objects.get_by_ekey(tracker_id)
  File "/Users/amitu/.pyenv/versions/acko/lib/python3.5/site-packages/encrypted_id/models.py", line 18, in get_by_ekey
    return self.get(id=decode(ekey, get_model_sub_key(self.model)), **kw)
  File "/Users/amitu/.pyenv/versions/acko/lib/python3.5/site-packages/encrypted_id/__init__.py", line 82, in decode
    raise EncryptedIDDecodeError()
encrypted_id.EncryptedIDDecodeError: Failed to decrypt, invalid input.

Yo @jatinderjit! Have a look when you get time.

@amitu
Copy link
Owner Author

amitu commented Oct 9, 2017

I think it is because of the binascii.crc32(bytes(the_id)) line. This allocates the_id number of bytes, instead of converting the_id to bytes (which is what I wanted to do).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant