Skip to content

TypeError: 'type' object is not iterable in "cryptography/x509/name.py", line 28 #4020

@relunctance

Description

@relunctance

"cryptography/x509/name.py", line 28, in
_ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
TypeError: 'type' object is not iterable

Activity

relunctance

relunctance commented on Nov 15, 2017

@relunctance
Author

pip uninstall enum
pip install enum34

can fixed this bug

reaperhulk

reaperhulk commented on Nov 15, 2017

@reaperhulk
Member

We list enum34 in our requirements already. It might make sense to add this to the FAQ though.

alex

alex commented on Nov 20, 2017

@alex
Member

Dupe of #4010

tannupiyush

tannupiyush commented on Nov 23, 2018

@tannupiyush

i am getting same error!! i am unable to unintsall enum and install enum34..
pip uninstall enum
pip install enum34
By using these commands i am unable fix bug.can i can any solution or reason for this issue?

harshini4

harshini4 commented on Jan 9, 2019

@harshini4

@tannupiyush Were you able to figure out a solution? Running into the same issue - cannot uninstall enum because running pip uninstall enum gives me the same TypeError.

tongpinmo

tongpinmo commented on Jan 18, 2019

@tongpinmo

@harshini4 @tannupiyush have you ever solved the problem ,running pip uninstall enum gives me the same TypeError.

spica45

spica45 commented on Jan 30, 2019

@spica45

@tongpinmo , I had the same issue, was able to solve it by manually removing enum and crapytography. Here are the steps that I did -

  1. Removed enum from "/usr/lib/python2.7/dist-packages": rm -rf enum*
  2. When I tried to install enum34 using "pip install enum34" I still run into the same error from cryptography: "TypeError: 'type' object is not iterable". (I think its because there is a copy of enum present under "/usr/local/lib/python2.7/dist-packages" as well.
  3. Next I removed cryptography from "/usr/lib/python2.7/dist-packages": rm -rf cryptography*
  4. Now try running "pip uninstall enum", it works.
  5. Then install enum34: pip install enum34
  6. Then install cryptography again: pip install cryptography
tongpinmo

tongpinmo commented on Jan 31, 2019

@tongpinmo

@nithinn86 ok,thank you very much

autodataming

autodataming commented on Apr 23, 2019

@autodataming

pipenv install enum34

locked as resolved and limited conversation to collaborators on Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alex@reaperhulk@relunctance@harshini4@autodataming

        Issue actions

          TypeError: 'type' object is not iterable in "cryptography/x509/name.py", line 28 · Issue #4020 · pyca/cryptography