Форум сайта python.su
Короче работал с монгодб но вчера так как монга ушла из россии программа не работает, можно как то обойти блокировку?
Traceback (most recent call last):
File “c:\Users\Merty\Desktop\Merty\Python\bot bank\main.py”, line 129, in <module>
bot.polling(none_stop = True, interval = 0)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\telebot\__init__.py”, line 658, in polling
self.__threaded_polling(non_stop, interval, timeout, long_polling_timeout, allowed_updates)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\telebot\__init__.py”, line 720, in __threaded_polling
raise e
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\telebot\__init__.py”, line 680, in __threaded_polling
self.worker_pool.raise_exceptions()
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\telebot\util.py”, line 135, in raise_exceptions
raise self.exception_info
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\telebot\util.py”, line 87, in run
task(*args, **kwargs)
File “c:\Users\Merty\Desktop\Merty\Python\bot bank\main.py”, line 23, in button_menu
if users_collection.count_documents({'tg id': str(message.from_user.id)}) == 0:
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\collection.py”, line 1622, in count_documents
return self.__database.client._retryable_read(
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\mongo_client.py”, line 1350, in _retryable_read server = self._select_server(read_pref, session, address=address)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\mongo_client.py”, line 1176, in _select_server
server = topology.select_server(server_selector)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\topology.py”, line 247, in select_server
servers = self.select_servers(selector, server_selection_timeout, address)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\topology.py”, line 208, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)
File “C:\Users\Merty\AppData\Roaming\Python\Python310\site-packages\pymongo\topology.py”, line 223, in _select_servers_loop raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: cluster-for-difrent-pro-shard-00-01.sscm4.mongodb.net:27017: connection closed,cluster-for-difrent-pro-shard-00-00.sscm4.mongodb.net:27017: connection closed,cluster-for-difrent-pro-shard-00-02.sscm4.mongodb.net:27017: connection closed, Timeout: 30s, Topology Description: <TopologyDescription id: 6239d6ff9368eb400f80fc59, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster-for-difrent-pro-shard-00-00.sscm4.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster-for-difrent-pro-shard-00-00.sscm4.mongodb.net:27017: connection
closed')>, <ServerDescription ('cluster-for-difrent-pro-shard-00-01.sscm4.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster-for-difrent-pro-shard-00-01.sscm4.mongodb.net:27017: connection closed')>, <ServerDescription ('cluster-for-difrent-pro-shard-00-02.sscm4.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster-for-difrent-pro-shard-00-02.sscm4.mongodb.net:27017: connection closed')>]>
PS C:\Users\Merty\Desktop\Merty\Python>
Отредактировано Merty (Март 22, 2022 16:07:04)
Офлайн
Что тебе мешает развернуть монгу на собственном сервере?
Офлайн