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

TypeError: was_modified_since() takes from 0 to 2 positional arguments but 3 were given #45

Open
luk156 opened this issue Aug 2, 2023 · 5 comments

Comments

@luk156
Copy link

luk156 commented Aug 2, 2023

[02/Aug/2023 08:19:34] "GET /imagefit/media_resize/600x600/products_images/0515-2.png HTTP/1.1" 500 95555
Internal Server Error: /imagefit/media_resize/600x600/products_images/0500-2.png
Traceback (most recent call last):
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/imagefit/views.py", line 45, in resize
if not was_modified_since(request.META.get('HTTP_IF_MODIFIED_SINCE'),
TypeError: was_modified_since() takes from 0 to 2 positional arguments but 3 were given

@vinyll
Copy link
Owner

vinyll commented Sep 7, 2023

@luk156 A major update was done for Django 4.2. Can you upgrade to Django Imagefit 0.8.0 and see if your error persists?

@luk156
Copy link
Author

luk156 commented Oct 16, 2023

dont' work (i'm on django 4.2)

Traceback (most recent call last):
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/imagefit/views.py", line 49, in resize
sig = Signature(was_modified_since)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/inspect.py", line 2812, in init
for param in parameters:
TypeError: 'function' object is not iterable

@luk156
Copy link
Author

luk156 commented Oct 16, 2023

dont' work (i'm on django 4.2)

Traceback (most recent call last): File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/matteolucchesi/PycharmProjects/asa-backend/venv/lib/python3.9/site-packages/imagefit/views.py", line 49, in resize sig = Signature(was_modified_since) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/inspect.py", line 2812, in init for param in parameters: TypeError: 'function' object is not iterable

@vinyll

@Nebuchadrezzar
Copy link
Contributor

Nebuchadrezzar commented Nov 12, 2023

This appears to be the same issue as #48.

@Nebuchadrezzar
Copy link
Contributor

@luk156 can we close this issue out?

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

3 participants