FlightSql 在 Linux 上运行但在 Windows 上失败并出现错误

问题描述 投票:0回答:0

以下代码在来自 colab 的 Linux 操作系统上运行良好

from flightsql import FlightSQLClient

from urllib.parse import urlparse
parsed_uri = urlparse('https://us-east-1-1.aws.cloud2.influxdata.com' )
bucket_name="VLBA"
host_name=parsed_uri.hostname
data_frame_measurement_name="UnitPrice"
token = "u10r0Iyf8jnCwaHd5ktpHPZtBAoCyvZtY_8THsW84VMK73GmQ1Md2qOWs5UNaW1uRoLmD7Oqz4AW72WqQQ7cNQ==" 
query_client = FlightSQLClient(
host = host_name,
token = token,
metadata={"bucket-name": bucket_name})
query = """SELECT *
FROM '{}'
""".format(data_frame_measurement_name)

info = query_client.execute(query)

但在 Windows 上失败并出现错误

    raceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\arunj\anaconda3\envs\newenv\lib\site-packages\flightsql\client.py", line 123, in execute
    return self._get_flight_info(flightsql.CommandStatementQuery(query=query), call_options)
  File "C:\Users\arunj\anaconda3\envs\newenv\lib\site-packages\flightsql\util.py", line 8, in g
    return f(self, *args, **kwargs)
  File "C:\Users\arunj\anaconda3\envs\newenv\lib\site-packages\flightsql\client.py", line 293, in _get_flight_info
    return self.client.get_flight_info(flight_descriptor(command), options)
  File "pyarrow\_flight.pyx", line 1506, in pyarrow._flight.FlightClient.get_flight_info
  File "pyarrow\_flight.pyx", line 71, in pyarrow._flight.check_flight_status
pyarrow._flight.FlightUnavailableError: Flight returned unavailable error, with message: empty address list:

然后不断抛出以下错误:

Failed to create secure subchannel for secure name 'us-east-1-1.aws.cloud2.influxdata.com:443'; Got args: {grpc.client_channel_factory=0x23d61811d90, grpc.default_authority=us-east-1-1.aws.cloud2.influxdata.com:443, grpc.initial_reconnect_backoff_ms=100, grpc.internal.channel_credentials=0x23d62fed4f0, grpc.internal.subchannel_pool=0x23d62ff06a0, grpc.max_receive_message_length=-1, grpc.primary_user_agent=grpc-c++/1.50.1, grpc.resource_quota=0x23d62ff09d0, grpc.server_uri=dns:///us-east-1-1.aws.cloud2.influxdata.com:443, grpc.use_local_subchannel_pool=1}
python influxdb pyarrow
© www.soinside.com 2019 - 2024. All rights reserved.