Я пытаюсь импортировать данные из MongoDB в машинное обучение Azure с помощью скрипта Python.Я использую следующий скрипт:
import pymongo as pymongo
import pandas as pd
def azureml_main(dataframe1 = None, dataframe2 = None):
client = pymongo.MongoClient("SERVER:USERNAME:PASSWORD")
db = client['DATABASE']
coll = db['COLLECTION']
cursor = coll.find().limit(10)
df = pd.DataFrame(list(cursor))
return df,
Это дает мне следующую ошибку:
Error 0085: The following error occurred during script evaluation, please view the output log for more information:
---------- Start of error message from Python interpreter ----------
Caught exception while executing function: Traceback (most recent call last):
File "C:\server\invokepy.py", line 199, in batch
odfs = mod.azureml_main(*idfs)
File "C:\temp\416f67ae321a4f7b9a2d5eda63aa127c.py", line 23, in azureml_main
df = pd.DataFrame(list(cursor))
File "C:\pyhome\lib\site-packages\pymongo\cursor.py", line 977, in next
if len(self.__data) or self._refresh():
File "C:\pyhome\lib\site-packages\pymongo\cursor.py", line 902, in _refresh
self.__read_preference))
File "C:\pyhome\lib\site-packages\pymongo\cursor.py", line 813, in __send_message
**kwargs)
File "C:\pyhome\lib\site-packages\pymongo\mongo_client.py", line 728, in _send_message_with_response
server = topology.select_server(selector)
File "C:\pyhome\lib\site-packages\pymongo\topology.py", line 121, in select_server
address))
File "C:\pyhome\lib\site-packages\pymongo\topology.py", line 97, in select_servers
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: SERVERNAME:XXXXX:[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond,SERVERNAME:XXXXX: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond,SERVERNAME:XXXXX: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Process returned with non-zero exit code 1
Это вызвано отсутствием белого списка любых IP-адресов?Я не могу найти никакой информации о том, какой IP-адрес используется в Azure ML.Есть ли решение этой проблемы?