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

'NoneType' object has no attribute 'name' #31

Open
saher554 opened this issue Nov 26, 2023 · 0 comments
Open

'NoneType' object has no attribute 'name' #31

saher554 opened this issue Nov 26, 2023 · 0 comments

Comments

@saher554
Copy link

hello
big fan of the project but recently
i had a small issue described below
'NoneType' object has no attribute 'name' error in function _get_session_cookies in file session.py
can you please fix this and thanks in advance

  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 297, in get
    return self.crack(self.request('GET', url, **kwargs))
  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 270, in crack
    self._apply_cookies(org.url)
  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 228, in _apply_cookies
    self._set_incap_cookie(test(), self.cookie_domain or host)
  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 189, in _set_incap_cookie
    cookies = self._get_session_cookies()
  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 146, in _get_session_cookies
    return [cookie.value for cookie in self.cookies if cookie.name.startswith('incap_ses_')]
  File "/usr/local/lib/python3.10/dist-packages/incapsula/session.py", line 146, in <listcomp>
    return [cookie.value for cookie in self.cookies if cookie.name.startswith('incap_ses_')]
AttributeError: 'NoneType' object has no attribute 'name'
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

1 participant