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

🐞 electionguard-python fails to install dependencies #799

Open
1 task done
alecslupu opened this issue May 11, 2023 · 0 comments
Open
1 task done

🐞 electionguard-python fails to install dependencies #799

alecslupu opened this issue May 11, 2023 · 0 comments
Labels
bug Something isn't working triage Waiting to be triaged

Comments

@alecslupu
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When trying to install and use electionguard-python, there is an error when trying to install dependencies.
When running make install the following output is being presented:

🔧 INSTALL
poetry install
Installing dependencies from lock file

Package operations: 131 installs, 0 updates, 0 removals

  • Installing attrs (21.4.0): Failed

  AttributeError

  'HTTPResponse' object has no attribute 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
       50│                 ),
       51│                 u"status": response.status,
       52│                 u"version": response.version,
       53│                 u"reason": text_type(response.reason),
    →  54│                 u"strict": response.strict,
       55│                 u"decode_content": response.decode_content,
       56│             }
       57│         }
       58│ 

  • Installing pycparser (2.21): Failed

  AttributeError

  'HTTPResponse' object has no attribute 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
       50│                 ),
       51│                 u"status": response.status,
       52│                 u"version": response.version,
       53│                 u"reason": text_type(response.reason),
    →  54│                 u"strict": response.strict,
       55│                 u"decode_content": response.decode_content,
       56│             }
       57│         }
       58│ 

  • Installing pyrsistent (0.18.1): Failed

  AttributeError

  'HTTPResponse' object has no attribute 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
       50│                 ),
       51│                 u"status": response.status,
       52│                 u"version": response.version,
       53│                 u"reason": text_type(response.reason),
    →  54│                 u"strict": response.strict,
       55│                 u"decode_content": response.decode_content,
       56│             }
       57│         }
       58│ 

  • Installing six (1.16.0): Failed

  TypeError

  __init__() got an unexpected keyword argument 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:141 in prepare_response
      137│             #
      138│             #     TypeError: 'str' does not support the buffer interface
      139│             body = io.BytesIO(body_raw.encode("utf8"))
      140│ 
    → 141│         return HTTPResponse(body=body, preload_content=False, **cached["response"])
      142│ 
      143│     def _loads_v0(self, request, data, body_file=None):
      144│         # The original legacy cache data. This doesn't contain enough
      145│         # information to construct everything we need, so we'll treat this as

  • Installing traitlets (5.1.1): Failed

  AttributeError

  'HTTPResponse' object has no attribute 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
       50│                 ),
       51│                 u"status": response.status,
       52│                 u"version": response.version,
       53│                 u"reason": text_type(response.reason),
    →  54│                 u"strict": response.strict,
       55│                 u"decode_content": response.decode_content,
       56│             }
       57│         }
       58│ 

  • Installing zipp (3.8.0): Failed

  AttributeError

  'HTTPResponse' object has no attribute 'strict'

  at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
       50│                 ),
       51│                 u"status": response.status,
       52│                 u"version": response.version,
       53│                 u"reason": text_type(response.reason),
    →  54│                 u"strict": response.strict,
       55│                 u"decode_content": response.decode_content,
       56│             }
       57│         }
       58│ 

make: *** [Makefile:25: install] Error 1

Expected Behavior

running make environment && make install should be successful.

Steps To Reproduce

No response

Environment

- OS: Ubuntu 22.04

Anything else?

Solution proposed by psf/cachecontrol#292 is to upgrade poetry version to 1.4.2

I have tested locally, and works as expected. The line needed to be changed is:
https://github.com/microsoft/electionguard-python/blob/b3ddc2a732f6c5f078a3afbe05b00d632a2ff5e0/Makefile#LL17C2-L17C31

@alecslupu alecslupu added bug Something isn't working triage Waiting to be triaged labels May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Waiting to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant