Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless: Unable to do local development when using progress_update #345

Open
captainjapeng opened this issue Sep 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@captainjapeng
Copy link

Describe the bug
When using runpod.serverless.progress_update(job, update) the command line throws this error below:

Exception in thread Thread-14 (_thread_target):
Traceback (most recent call last):
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp\client.py", line 586, in _request
    raise err_exc_cls(url)
aiohttp.client_exceptions.InvalidUrlClientError: JOB_DONE_URL&isStream=false

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_progress.py", line 41, in _thread_target
    loop.run_until_complete(main())
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\asyncio\base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_progress.py", line 39, in main
    await _async_progress_update(session, job, progress)
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_progress.py", line 25, in _async_progress_update
    await send_result(session, job_data, job)
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_http.py", line 73, in send_result
    await _handle_result(session, job_data, job, JOB_DONE_URL, "Results sent.", is_stream=is_stream)
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_http.py", line 53, in _handle_result
    await _transmit(session, url, serialized_job_data)
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\serverless\modules\rp_http.py", line 36, in _transmit
    async with retry_client.post(url, **kwargs) as client_response:
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp_retry\client.py", line 149, in __aenter__
    return await self._do_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp_retry\client.py", line 138, in _do_request
    raise e
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp_retry\client.py", line 100, in _do_request
    response: ClientResponse = await self._request_func(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp\client.py", line 812, in _request
    await trace.send_request_exception(
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiohttp\tracing.py", line 399, in send_request_exception
    return await self._trace_config.on_request_exception.send(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\aiosignal\__init__.py", line 36, in send
    await receiver(*args, **kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jaspe\anaconda3\envs\yolo\Lib\site-packages\runpod\tracer.py", line 148, in on_request_exception
    context.transfer = elapsed - context.connect
                                 ^^^^^^^^^^^^^^^
AttributeError: 'types.SimpleNamespace' object has no attribute 'connect'

To Reproduce
Steps to reproduce the behavior:

  1. Create a job with runpod.serverless.progress_update
  2. Run with python -u .\src\handler.py --rp_serve_api --rp_api_port 8012 or python -u .\src\handler.py

Expected behavior
If this will not be a supported behavior on local, it should not continue with a network request.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
@captainjapeng captainjapeng added the bug Something isn't working label Sep 8, 2024
@matanyall
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants