Hi Team, quick one please. I am unable to send dat...
# help
u
Hi Team, quick one please. I am unable to send data to lakefs using the lake-client. The upload process fails with this message in the airflow log
File "/home/airflow/.local/lib/python3.7/site-packages/lakefs_client/api/branches_api.py", line 862, in list_branches
return self.list_branches_endpoint.call_with_http_info(**kwargs)
File "/home/airflow/.local/lib/python3.7/site-packages/lakefs_client/api_client.py", line 851, in call_with_http_info
collection_formats=params['collection_format'])
File "/home/airflow/.local/lib/python3.7/site-packages/lakefs_client/api_client.py", line 415, in call_api
_check_type)
File "/home/airflow/.local/lib/python3.7/site-packages/lakefs_client/api_client.py", line 189, in __call_api
url = self.configuration.host + resource_path
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Copy code
My code looks something like this:                                                                                                                                                                                                                                                                                                        def upload_events_data_to_s3():
    file_path = "/opt/airflow/Dataset/v1/events.parquet"  
    print(client.branches.list_branches('test').results)
    with open(file_path, 'rb') as f:
        client.objects.upload_object(repository='test', branch='main', path='bronzelayer/ApiData/events.parquet', content=f)
        f.close()
u
What I am not sure is, if this issue is associated with airflow itself or lakefs-client. Been trying to debug this all night to no avail.
u
Hi @Jude, can you print or check what value was passed to the client you initialized? if you initialized
LakeFSClient(configuration)
what was set to configuration.host?
u
Okay
u
I feel stupid right now, Lolzzz. Thanks for pointing me in the right direction. There was actually nothing passed to the client as the configurations were wrongly parsed from the .env file. Many thanks!❤️
u
happened to all of us... this is why I know the error