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

Issue report / when importing sb #38

Closed
SebaCrespo10 opened this issue Feb 3, 2023 · 3 comments
Closed

Issue report / when importing sb #38

SebaCrespo10 opened this issue Feb 3, 2023 · 3 comments
Assignees

Comments

@SebaCrespo10
Copy link

Contact Details

seba.crespo10@gmail.com

Version

1.0.1

What platform are you seeing the problem on?

Windows

What Python version are you running, are you using a virtual environment? Give us as much info as you can.

python 3.8

What happened?

When importig sb i got the following error.

from statsbombpy import sb

Relevant log output

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [9], in <cell line: 5>()
      2 import numpy as np
      3 import matplotlib.pyplot as plt
----> 5 from statsbombpy import sb

File ~/opt/anaconda3/lib/python3.9/site-packages/statsbombpy/sb.py:9, in <module>
      7 from statsbombpy import api_client, public
      8 from statsbombpy.config import DEFAULT_CREDS, PARALLELL_CALLS_NUM
----> 9 from statsbombpy.helpers import (
     10     filter_and_group_events,
     11     merge_events_and_frames,
     12     reduce_events,
     13 )
     16 def competitions(fmt="dataframe", creds: dict = DEFAULT_CREDS):
     17     if api_client.has_auth(creds) is True:

File ~/opt/anaconda3/lib/python3.9/site-packages/statsbombpy/helpers.py:3, in <module>
      1 from collections import defaultdict
----> 3 import inflect
      4 import pandas as pd
      5 from joblib import Memory

File ~/opt/anaconda3/lib/python3.9/site-packages/inflect/__init__.py:76, in <module>
     60 from typing import (
     61     Dict,
     62     Union,
   (...)
     71     Any,
     72 )
     73 from numbers import Number
---> 76 from pydantic import Field, validate_arguments
     77 from pydantic.typing import Annotated
     80 class UnknownClassicalModeError(Exception):

File ~/opt/anaconda3/lib/python3.9/site-packages/pydantic/__init__.py:2, in init pydantic.__init__()

File ~/opt/anaconda3/lib/python3.9/site-packages/pydantic/dataclasses.py:46, in init pydantic.dataclasses()

File ~/opt/anaconda3/lib/python3.9/site-packages/pydantic/main.py:121, in init pydantic.main()

TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'

Code to reproduce issue

No response

Attempted solutions

No response

@WillTGM
Copy link
Contributor

WillTGM commented Feb 3, 2023

Hi, thanks for getting in touch.

Could you:

  1. Try with Python version 3.8? Your stack trace suggests you're using 3.9 and we haven't tested above 3.8.
  2. Upgrade your version of statsbombpy to the latest version, which should be 1.6.1 rather than using 1.0.1.
  3. Can you check what version of pydantic you are using? There have been some recent issues with a new release, which might be the root cause here.

Thanks.

@SebaCrespo10
Copy link
Author

Thanks,
I am using latest version of statsbombpy and pydantic 1.10.4.

Using Python 3.8 solved the problem. Thanks!

@WillTGM
Copy link
Contributor

WillTGM commented Feb 6, 2023

Great. Glad that solved it.

@WillTGM WillTGM closed this as completed Feb 6, 2023
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

3 participants