Open jovezhong opened 1 month ago
While I am testing the dbt plugin, I hit the issue in proton_driver/connection.py:397: in send_hello
proton_driver/connection.py:397: in send_hello
/Users/jove/Dev/py310-dbt18-env/lib/python3.10/site-packages/proton_driver/connection.py:397: in send_hello write_binary_str(self.database, self.fout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ text = None, buf = <proton_driver.bufferedwriter.BufferedSocketWriter object at 0x121f2dcb0> def write_binary_str(text, buf): > text = text.encode('utf-8') E AttributeError: 'NoneType' object has no attribute 'encode' /Users/jove/Dev/py310-dbt18-env/lib/python3.10/site-packages/proton_driver/writer.py:15: AttributeError
I tried both Python 3.10 and 3.12, both 0.2.8 and 0.2.10. This can be reproduced with pytest --log-cli-level=DEBUG tests/functional/test_proton.py in the dbt-proton repo. But I will try to extract it and reproduce this without dbt.
pytest --log-cli-level=DEBUG tests/functional/test_proton.py
dbt-proton
The reason is the database can be None. In that case it fails call the encode method. Should check whether the text is none.
database
While I am testing the dbt plugin, I hit the issue in
proton_driver/connection.py:397: in send_hello
I tried both Python 3.10 and 3.12, both 0.2.8 and 0.2.10. This can be reproduced with
pytest --log-cli-level=DEBUG tests/functional/test_proton.py
in thedbt-proton
repo. But I will try to extract it and reproduce this without dbt.