Creating a python source connector but erroring without doing anything yet

I am following the instructions on Building a Python Source | Airbyte Documentation and im currently on step 3.
I made my .venv and dowloaded the requirements.txt without a hitch.
I am using python 3 version 3.11.1
I tried running python main.py spec just to see the output and I got this error.

Traceback (most recent call last):
  File "source/main.py", line 8, in <module>
    from airbyte_cdk.entrypoint import launch
  File "source/.venv/lib/python3.11/site-packages/airbyte_cdk/__init__.py", line 5, in <module>
    from .connector import AirbyteSpec, Connector
  File "source-/.venv/lib/python3.11/site-packages/airbyte_cdk/connector.py", line 14, in <module>
    from airbyte_cdk.models import AirbyteConnectionStatus, ConnectorSpecification
  File "source.venv/lib/python3.11/site-packages/airbyte_cdk/models/__init__.py", line 2, in <module>
    from .airbyte_protocol import *
  File "source/.venv/lib/python3.11/site-packages/airbyte_cdk/models/airbyte_protocol.py", line 346, in <module>
    class AirbyteStateMessage(BaseModel):
  File "source/.venv/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "source-hubspot-companies-history/.venv/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/inspect.py", line 2721, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
ValueError: 'global' is not a valid parameter name

I removed the my path to shorted the code. Im trying to look into the error but Im new to this and Im not sure what I am suppose to do. I dont even see ‘global’ on anything

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

Hello,

I am getting the same error and looking around the web I am not really getting the cause of this.

Is the python version the possible issue? I am using Python 3.11.1.

Thank you!

Please use Python 3.9 not 3.11 see requirements for the tech stack: https://docs.airbyte.com/contributing-to-airbyte/developing-locally

I was facing the same issue when I was using Python 3.11.x
I was able to resolve this issue by downgrading my Python version from 3.11 to 3.9