BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future

Open dmvtech opened this issue 4 years ago • 0 comments

Sample information

  1. Sample type: \samples\python
  2. Sample language: python
  3. Sample name: Python Teams samples that use search.
    1. 50.teams-messaging-extension-search
    2. 52.teams-messaging-extensions-search-auth-config

Describe the bug

Running python samples 50 and 52, you get the following error:

 [on_turn_error] unhandled error: <Fault -32500: "RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">
Traceback (most recent call last):
  File "c:\<PYTHONLIBRARY>\botbuilder-python\libraries\botbuilder-core\botbuilder\core\bot_adapter.py", line 128, in run_pipeline
    return await self._middleware.receive_activity_with_status(
  File "c:\<PYTHONLIBRARY>\botbuilder-python\libraries\botbuilder-core\botbuilder\core\middleware_set.py", line 69, in receive_activity_with_status
    return await self.receive_activity_internal(context, callback)
  File "c:\<PYTHONLIBRARY>\botbuilder-python\libraries\botbuilder-core\botbuilder\core\middleware_set.py", line 79, in receive_activity_internal
    return await callback(context)
  File "c:\<PYTHONLIBRARY>\botbuilder-python\libraries\botbuilder-core\botbuilder\core\activity_handler.py", line 78, in on_turn
    invoke_response = await self.on_invoke_activity(turn_context)
  File "c:\<PYTHONLIBRARY>\botbuilder-python\libraries\botbuilder-core\botbuilder\core\teams\teams_activity_handler.py", line 93, in on_invoke_activity
    await self.on_teams_messaging_extension_query(
  File "C:\<SAMPLEDIRECTORY>\BotBuilder-Samples\samples\python\50.teams-messaging-extension-search\bots\search_based_messaging_extension.py", line 28, in on_teams_messaging_extension_query
    search_results = self._get_search_results(search_query)
  File "C:\<SAMPLEDIRECTORY>\BotBuilder-Samples\samples\python\50.teams-messaging-extension-search\bots\search_based_messaging_extension.py", line 72, in _get_search_results
    search_results = client.search({"name": query})
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1456, in __request
    response = self.__transport.request(
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1160, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1176, in single_request
    return self.parse_response(resp)
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 1348, in parse_response
    return u.close()
  File "C:\Users\<USERPROFILE>\AppData\Local\Programs\Python\Python39\lib\xmlrpc\client.py", line 662, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">

To Reproduce

Steps to reproduce the behavior:

  1. Configure and run Python sample using ngrok and MS Teams
  2. Test search functionality
  3. Error shows up in console and receive friendly 'The bot encountered an error or bug. To continue to run this bot, please fix the bot source code.' friendly messages.

Expected behavior

Sample does not error and able to return search results.

dmvtech avatar Jul 14 '21 20:07 dmvtech