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: _quote() got an unexpected keyword argument 'strict' in update_cookies function in CookieJar. #1727

Closed
AraHaan opened this issue Mar 19, 2017 · 4 comments
Labels

Comments

@AraHaan
Copy link
Contributor

AraHaan commented Mar 19, 2017

Long story short

Cannot run my code with latest aiohttp with latest pip version of yarl 0.10.0.

Expected behaviour

Everything to work like normally with the previous version of aiohttp and yarl.

Actual behaviour

The actual behavior is this traceback and then the program quits.

Traceback (most recent call last):
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\DecoraterBot.py", line 23, i
n <module>
    import DecoraterBotCore
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\resources\Dependencies\Decor
aterBotCore\__init__.py", line 12, in <module>
    from . import Core
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\resources\Dependencies\Decor
aterBotCore\Core.py", line 20, in <module>
    import aiohttp
  File "E:\Python360\lib\site-packages\aiohttp\__init__.py", line 11, in <module
>
    from .connector import *  # noqa
  File "E:\Python360\lib\site-packages\aiohttp\connector.py", line 17, in <modul
e>
    from .client import ClientRequest
  File "E:\Python360\lib\site-packages\aiohttp\client.py", line 20, in <module>
    from .cookiejar import CookieJar
  File "E:\Python360\lib\site-packages\aiohttp\cookiejar.py", line 15, in <modul
e>
    class CookieJar(AbstractCookieJar):
  File "E:\Python360\lib\site-packages\aiohttp\cookiejar.py", line 91, in Cookie
Jar
    def update_cookies(self, cookies, response_url=URL()):
  File "E:\Python360\lib\site-packages\yarl\__init__.py", line 187, in __init__
    _quote(val[2], safe='+@:', protected='/+', strict=strict),
  File "yarl/_quoting.pyx", line 40, in yarl._quoting._quote (yarl/_quoting.c:13
40)
    return None
TypeError: _quote() got an unexpected keyword argument 'strict'

Steps to reproduce

run the following requirements.txt file in pip for Python 3.5/3.6:

discord.py
aiohttp
PyNacl
pycares
cchardet
cffi
multidict
yarl
discord.webhooks

And then try to run some code that imports aiohttp (or just import aiohttp in the python 3.6 console).

Your environment

Python 3.6, Windows 7 x64 Ultimate Build 7601.

@AraHaan
Copy link
Contributor Author

AraHaan commented Mar 19, 2017

This is related to the fact that the latest yarl and the latest multidict cannot install on python 3.6 as there are no weels for them therefore aiohttp tries to use an older copy of multidict and yarl and then fails to work at all Seems now the only solution is to add Python 3.6 wheels for windows and linux for those packages.

@AraHaan
Copy link
Contributor Author

AraHaan commented Mar 19, 2017

Alright so both of these PR's would have to be merged so it can close this issue, this issue, and this issue:
aio-libs/multidict#60
aio-libs/yarl#68

@fafhrd91
Copy link
Member

it is not related to aiohttp. aiohttp properly set requirements for deps

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants