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

[BUG] Player class is not working with Python 3.11.0 #59

Closed
RavinderSingh13-git opened this issue Jun 24, 2023 · 3 comments
Closed

[BUG] Player class is not working with Python 3.11.0 #59

RavinderSingh13-git opened this issue Jun 24, 2023 · 3 comments
Assignees

Comments

@RavinderSingh13-git
Copy link

Describe the bug
When I am using from espncricinfo.player import Player and trying to execute p = Player('277916') its giving me an error.

To Reproduce
Gives me following error:

>>> p = Player('277916')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Singh\Desktop\Alexa Automation\.venv\Lib\site-packages\espncricinfo\player.py", line 14, in __init__
    self.player_information = self._parse_player_information()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Singh\Desktop\Alexa Automation\.venv\Lib\site-packages\espncricinfo\player.py", line 60, in _parse_player_information
    return self.parsed_html.find_all('p', class_='ciPlayerinformationtxt')
           ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find_all'

Expected behavior
It should give player information.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@YusiferZendric
Copy link

Same error please look into it.

@YusiferZendric
Copy link

I've found a temporary solution
Remove the self.major_teams and _major_teams function or comment them out it should work

This was referenced Jan 11, 2024
@JackMa222
Copy link
Contributor

I have written a PR to attempt to fix this #62

@dwillis dwillis closed this as completed Jan 13, 2024
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

4 participants