微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

great_expectations 和scrapy

如何解决great_expectations 和scrapy

当我使用具有 great_expectations 和 scrapy 的项目时,似乎存在以某种方式冲突的错误

当我卸载这些库中的任何一个时,一切正常,但同时使用时会出现一些错误

这是我的堆栈跟踪,但我无法弄清楚根本原因是什么,任何帮助都会很棒:

Retrieving local flow... Error
  Traceback (most recent call last):
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/prefect/cli/run.py",line 75,in try_error_done
    yield
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/prefect/cli/run.py",line 564,in run
    flow = get_flow_from_path_or_module(path=path,module=module,name=name)
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/prefect/cli/run.py",line 173,in get_flow_from_path_or_module
    flows = load_flows_from_script(path) if path else load_flows_from_module(module)
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/prefect/cli/run.py",line 121,in load_flows_from_script
    namespace = runpy.run_path(path,run_name="<flow>")
    File "/usr/local/Caskroom/miniconda/base/lib/python3.8/runpy.py",line 265,in run_path
    return _run_module_code(code,init_globals,run_name,File "/usr/local/Caskroom/miniconda/base/lib/python3.8/runpy.py",line 97,in _run_module_code
    _run_code(code,mod_globals,line 87,in _run_code
    exec(code,run_globals)
    File "flows/greyhound_recorder/dog_gender_scraper_flow.py",line 3,in <module>
    from flows.greyhound_recorder.tasks import (
    File "/Users/user/code/es-scraping-flows/flows/greyhound_recorder/tasks.py",in <module>
    from flows.greyhound_recorder.functions import (
    File "/Users/user/code/es-scraping-flows/flows/greyhound_recorder/functions.py",in <module>
    from flows.common.functions import query_db_for_df
    File "/Users/user/code/es-scraping-flows/flows/common/functions.py",line 6,in <module>
    from python.data_validation.expectations import Expectations
    File "/Users/user/code/es-scraping-flows/python/data_validation/expectations.py",in <module>
    import great_expectations as ge
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/__init__.py",line 7,in <module>
    from great_expectations.data_context import DataContext
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/data_context/__init__.py",line 1,in <module>
    from .data_context import BaseDataContext,DataContext,ExplorerDataContext
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/data_context/data_context.py",line 38,in <module>
    from great_expectations.core.usage_statistics.usage_statistics import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/core/usage_statistics/usage_statistics.py",line 21,in <module>
    from great_expectations.core.usage_statistics.anonymizers.data_docs_site_anonymizer import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/core/usage_statistics/anonymizers/data_docs_site_anonymizer.py",line 2,in <module>
    from great_expectations.core.usage_statistics.anonymizers.site_builder_anonymizer import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/core/usage_statistics/anonymizers/site_builder_anonymizer.py",in <module>
    from great_expectations.render.renderer.site_builder import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/render/renderer/__init__.py",in <module>
    from .column_section_renderer import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/render/renderer/column_section_renderer.py",line 15,in <module>
    from great_expectations.expectations.core.expect_column_kl_divergence_to_be_less_than import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/expectations/core/__init__.py",in <module>
    from .expect_column_distinct_values_to_be_in_set import (
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/expectations/core/expect_column_distinct_values_to_be_in_set.py",line 16,in <module>
    from ..expectation import ColumnExpectation,InvalidExpectationConfigurationError
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/expectations/expectation.py",line 1042,in <module>
    class TableExpectation(Expectation,ABC):
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/expectations/expectation.py",line 76,in __new__
    newclass._register_renderer_functions()
    File "/Users/user/code/es-scraping-flows/.venv/lib/python3.8/site-packages/great_expectations/expectations/expectation.py",line 151,in _register_renderer_functions
    attr_obj = getattr(cls,candidate_renderer_fn_name)
  AttributeError: __provides__

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。