8000 Cannot import name 'overload' from 'multimethod' · Issue #914 · ML-KULeuven/socceraction · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot import name 'overload' from 'multimethod' #914

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

Open
randomcrit2020 opened this issue Feb 21, 2025 · 3 comments
Open

Cannot import name 'overload' from 'multimethod' #914

randomcrit2020 opened this issue Feb 21, 2025 · 3 comments

Comments

@randomcrit2020
Copy link
randomcrit2020 commented Feb 21, 2025

I installed a fresh anaconda environment with python12 and the latest multimethod seems incompatible with the pandera requirement.
I reverted to an earlier version and the error is resolved
pip install --force-reinstall -v "multimethod==1.12"

----> 8 from socceraction.data.opta import OptaLoader
9 import socceraction
12 pd.set_option('display.max_columns', None)

File ~\AppData\Roaming\Python\Python311\site-packages\socceraction\data_init_.py:9
1 """Implements serializers for the event data of various providers."""
3 all = [
4     "opta",
5     "statsbomb",
6     "wyscout",
7 ]
----> 9 from . import opta, statsbomb, wyscout

File ~\AppData\Roaming\Python\Python311\site-packages\socceraction\data\opta_init_.py:12
1 """Module for loading Opta event data."""
3 all = [
4     "OptaLoader",
5     "OptaCompetitionSchema",
(...)
9     "OptaEventSchema",
10 ]
---> 12 from .loader import OptaLoader
13 from .schema import (
14     OptaCompetitionSchema,
15     OptaEventSchema,
(...)
18     OptaTeamSchema,
19 )

File ~\AppData\Roaming\Python\Python311\site-packages\socceraction\data\opta\loader.py:14
11 from typing import Any, Optional, Union, cast
13 import pandas as pd  # type: ignore
---> 14 from pandera.typing import DataFrame
16 from socceraction.data.base import EventDataLoader
18 from .parsers import (
19     F1JSONParser,
20     F7XMLParser,
(...)
27     WhoScoredParser,
28 )

File e:\Apps\anaconda3\envs\soccerdata\Lib\site-packages\pandera_init_.py:4
1 """A flexible and expressive pandas validation library."""
2 import platform
----> 4 import pandera.backends
5 from pandera import errors, external_config, typing
6 from pandera.accessors import pandas_accessor

File e:\Apps\anaconda3\envs\soccerdata\Lib\site-packages\pandera\backends_init_.py:6
4 import pandera.backends.base.builtin_checks
5 import pandera.backends.base.builtin_hypotheses
----> 6 import pandera.backends.pandas

File e:\Apps\anaconda3\envs\soccerdata\Lib\site-packages\pandera\backends\pandas_init_.py:13
10 from pandera.api.pandas.components import Column, Index, MultiIndex
12 from pandera.backends.pandas import builtin_checks, builtin_hypotheses
---> 13 from pandera.backends.pandas.checks import PandasCheckBackend
14 from pandera.backends.pandas.hypotheses import PandasHypothesisBackend
15 from pandera.backends.pandas.array import SeriesSchemaBackend

File e:\Apps\anaconda3\envs\soccerdata\Lib\site-packages\pandera\backends\pandas\checks.py:7
4 from typing import Dict, List, Optional, Union, cast
6 import pandas as pd
----> 7 from multimethod import DispatchError, overload
9 from pandera.api.base.checks import CheckResult, GroupbyObject
10 from pandera.api.checks import Check

ImportError: cannot import name 'overload' from 'multimethod' (e:\Apps\anaconda3\envs\soccerdata\Lib\site-packages\multimethod_init_.py)
@shufinskiy
Copy link

@randomcrit2020 for socceraction version 1.5.3 the following library versions are needed:
multimethod==1.9
pandera==0.17.2

Check version libraries in your enviroment:
pip show multimethod pandera

And reinstall:

pip install "multimethod==1.9" "pandera==0.17.2"

This solved my problem of importing the socceraction library.

@kieronmet
Copy link
kieronmet commented Mar 9, 2025

Can confirm

pip install "multimethod==1.9" "pandera==0.17.2"

resolves issue

@shufinskiy
Copy link

@probberechts You can probably close issue.

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
0