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

python 3.10 AttributeError: module 'collections' has no attribute 'Iterable' #64

Open
bwakkie opened this issue Jan 26, 2022 · 3 comments

Comments

@bwakkie
Copy link

bwakkie commented Jan 26, 2022

Got an error when using python 3.10:
I had to do the following change in order to have it back working in my project:

python3.10/site-packages/pure_pagination/paginator.py:
replace the first line "import collections" into:

try: # Python 3.10
    from collections.abc import Iterable
except ImportError:
    from collections import Iterable

AND line 109 " elif isinstance(result, collections.Iterable):" into
elif isinstance(result, Iterable):

@ImMacy
Copy link

ImMacy commented Jun 4, 2022

I have some question.
I can’t find :
elif isinstance(result, Iterable):

please show your
python3.10/site-packages/pure_pagination/paginator.py ?

thanks

@naturezen
Copy link

naturezen commented Jun 29, 2022

hi,I have a similar problem

python 3.10
Django 4.0.5

Error during template rendering
In template ~\templates\pure_pagination\pagination.html, error at line 11

Invalid block tag on line 11: 'ifequal', expected 'elif','else' or 'endif'. Did you forget to register or load this tag?

10 {% if page %}
11 {% ifequal page page_obj.number %}
12

  • {{ page }}
  • @bwakkie
    Copy link
    Author

    bwakkie commented Oct 16, 2022

    I have some question. I can’t find : elif isinstance(result, Iterable):

    please show your python3.10/site-packages/pure_pagination/paginator.py ?

    thanks

    Obviously you cant find it in the code as it needs to be changed into it. Read carefully ;-)

    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