Ive got gradle set up and am trying to build the w...
# help-connector-development
a
Ive got gradle set up and am trying to build the weaviate connector as is, before changes, via
./gradlew :airbyte-integrations:connectors:destination-weaviate:build
and I get:
Copy code
> Task :airbyte-integrations:connectors:destination-weaviate:_unitTestCoverage FAILED
[python] .venv/bin/python -m coverage run --data-file=unit_tests/.coverage.unitTest --rcfile=/Volumes/Documents/Repositories/airbyte/pyproject.toml -m pytest -s unit_tests -c /Volumes/Documents/Repositories/airbyte/pyproject.toml
         ============================= test session starts ==============================
         platform darwin -- Python 3.11.0, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /Volumes/Documents/Repositories/airbyte/airbyte-integrations/connectors/destination-weaviate/.venv/bin/python
         cachedir: .pytest_cache
         rootdir: /Volumes/Documents/Repositories/airbyte/airbyte-integrations/connectors/destination-weaviate/unit_tests, configfile: ../../../../pyproject.toml
         collecting ... collected 0 items / 1 error
         
         ==================================== ERRORS ====================================
         ________________________ ERROR collecting unit_test.py _________________________
         unit_tests/unit_test.py:8: in <module>
             from destination_weaviate.client import Client
         destination_weaviate/__init__.py:6: in <module>
             from .destination import DestinationWeaviate
         destination_weaviate/destination.py:9: in <module>
             from airbyte_cdk import AirbyteLogger
         .venv/lib/python3.11/site-packages/airbyte_cdk/__init__.py:5: in <module>
             from .connector import AirbyteSpec, Connector
         .venv/lib/python3.11/site-packages/airbyte_cdk/connector.py:14: in <module>
             from airbyte_cdk.models import AirbyteConnectionStatus, ConnectorSpecification
         .venv/lib/python3.11/site-packages/airbyte_cdk/models/__init__.py:8: in <module>
             from .airbyte_protocol import *
         .venv/lib/python3.11/site-packages/airbyte_cdk/models/airbyte_protocol.py:5: in <module>
             from airbyte_protocol.models.airbyte_protocol import *
         .venv/lib/python3.11/site-packages/airbyte_protocol/models/__init__.py:3: in <module>
             from .airbyte_protocol import *
         .venv/lib/python3.11/site-packages/airbyte_protocol/models/airbyte_protocol.py:374: in <module>
             class AirbyteStateMessage(BaseModel):
         .venv/lib/python3.11/site-packages/pydantic/main.py:292: in __new__
             cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
         .venv/lib/python3.11/site-packages/pydantic/utils.py:258: in generate_model_signature
             merged_params[param_name] = Parameter(
         /Users/vade/miniforge3/envs/airbyte/lib/python3.11/inspect.py:2715: in __init__
             raise ValueError('{!r} is not a valid parameter name'.format(name))
         E   ValueError: 'global' is not a valid parameter name
         =========================== short test summary info ============================
         ERROR unit_tests/unit_test.py - ValueError: 'global' is not a valid parameter...
         !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
         =============================== 1 error in 0.83s ===============================

FAILURE: Build failed with an exception.
a
global
is a reserved keyword in python 3.11. Can you try using a virtual environment with python 3.9?
a
oh interesting!
awesome. thats easy peasy. Thank you. TIL
🎉 1
is there a way to have gradle or this build process rebuild the venvs it makes interstially
ive got python 3.9 installed and pip, and have reinstalled the connectors requirements in my conda venv
but the gradle process is telling me airbyte_cdk is missing now
Requirement already satisfied: airbyte-cdk in /Users/vade/miniforge3/envs/airbyte/lib/python3.9/site-packages (from destination-weaviate==0.0.0->-r requirements.txt (line 1)) (0.32.0)
Copy code
> Task :airbyte-integrations:connectors:destination-weaviate:_unitTestCoverage FAILED
[python] .venv/bin/python -m coverage run --data-file=unit_tests/.coverage.unitTest --rcfile=/Volumes/Documents/Repositories/airbyte/pyproject.toml -m pytest -s unit_tests -c /Volumes/Documents/Repositories/airbyte/pyproject.toml
         ============================= test session starts ==============================
         platform darwin -- Python 3.9.0, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /Volumes/Documents/Repositories/airbyte/airbyte-integrations/connectors/destination-weaviate/.venv/bin/python
         cachedir: .pytest_cache
         rootdir: /Volumes/Documents/Repositories/airbyte/airbyte-integrations/connectors/destination-weaviate/unit_tests, configfile: ../../../../pyproject.toml
         collecting ... collected 0 items / 1 error
         
         ==================================== ERRORS ====================================
         ________________________ ERROR collecting unit_test.py _________________________
         ImportError while importing test module '/Volumes/Documents/Repositories/airbyte/airbyte-integrations/connectors/destination-weaviate/unit_tests/unit_test.py'.
         Hint: make sure your test modules/packages have valid Python names.
         Traceback:
         .venv/lib/python3.9/site-packages/_pytest/python.py:578: in _importtestmodule
             mod = import_path(self.fspath, mode=importmode)
         .venv/lib/python3.9/site-packages/_pytest/pathlib.py:524: in import_path
             importlib.import_module(module_name)
         /Users/vade/miniforge3/envs/airbyte/lib/python3.9/importlib/__init__.py:127: in import_module
             return _bootstrap._gcd_import(name[level:], package, level)
         <frozen importlib._bootstrap>:1030: in _gcd_import
             ???
         <frozen importlib._bootstrap>:1007: in _find_and_load
             ???
         <frozen importlib._bootstrap>:986: in _find_and_load_unlocked
             ???
         <frozen importlib._bootstrap>:680: in _load_unlocked
             ???
         .venv/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
             exec(co, module.__dict__)
         unit_tests/unit_test.py:8: in <module>
             from destination_weaviate.client import Client
         destination_weaviate/__init__.py:6: in <module>
             from .destination import DestinationWeaviate
         destination_weaviate/destination.py:9: in <module>
             from airbyte_cdk import AirbyteLogger
         E   ModuleNotFoundError: No module named 'airbyte_cdk'
         =========================== short test summary info ============================
         ERROR unit_tests/unit_test.py
         !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
         =============================== 1 error in 0.12s ===============================

FAILURE: Build failed with an exception.