```2022-05-26 11:04:12 | [INFO]:numexpr.utils - Nu...
# prefect-community
k
Copy code
2022-05-26 11:04:12 | [INFO]:numexpr.utils - NumExpr defaulting to 2 threads.
Traceback (most recent call last):
  File "/home/kayvan/projects/prefect-demo/flows/spire_current_weather.py", line 65, in <module>
    spire_current_weather()
  File "/home/kayvan/projects/prefect-demo/flows/spire_current_weather.py", line 62, in spire_current_weather
    spire_pipe(obj, sample)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/flows.py", line 319, in __call__
    return enter_flow_run_engine_from_flow_call(self, parameters)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/engine.py", line 110, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 95, in with_injected_client
    return await fn(*args, **kwargs)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/engine.py", line 158, in create_then_begin_flow_run
    flow_run = await client.create_flow_run(
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 538, in create_flow_run
    response = await <http://self._client.post|self._client.post>("/flow_runs/", json=flow_run_create_json)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_client.py", line 1820, in post
    return await self.request(
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_client.py", line 1506, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 233, in send
    response.raise_for_status()
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_models.py", line 1510, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '500 Internal Server Error' for url '<https://api-beta.prefect.io/api/accounts/2693bb0e-7537-4327-83f2-06354b5d2b4d/workspaces/d8a21cf4-12f7-45f8-9323-5fe529e45148/flow_runs/>'
For more information check: <https://httpstatuses.com/500>
While running flow in flow
Can't really understand why does it fail and doesn't create subflows
k
This, I need to test and try sometime today
Oh yeah and could you move this traceback to the thread when you get a chance?
Does this happen every time? I think a flow with similar structure and it worked
k
Traceback
Copy code
2022-05-26 11:04:12 | [INFO]:numexpr.utils - NumExpr defaulting to 2 threads.
Traceback (most recent call last):
  File "/home/kayvan/projects/prefect-demo/flows/spire_current_weather.py", line 65, in <module>
    spire_current_weather()
  File "/home/kayvan/projects/prefect-demo/flows/spire_current_weather.py", line 62, in spire_current_weather
    spire_pipe(obj, sample)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/flows.py", line 319, in __call__
    return enter_flow_run_engine_from_flow_call(self, parameters)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/engine.py", line 110, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 95, in with_injected_client
    return await fn(*args, **kwargs)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/engine.py", line 158, in create_then_begin_flow_run
    flow_run = await client.create_flow_run(
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 538, in create_flow_run
    response = await <http://self._client.post|self._client.post>("/flow_runs/", json=flow_run_create_json)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_client.py", line 1820, in post
    return await self.request(
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_client.py", line 1506, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/prefect/client.py", line 233, in send
    response.raise_for_status()
  File "/home/kayvan/anaconda3/envs/prefect-conda/lib/python3.9/site-packages/httpx/_models.py", line 1510, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '500 Internal Server Error' for url '<https://api-beta.prefect.io/api/accounts/2693bb0e-7537-4327-83f2-06354b5d2b4d/workspaces/d8a21cf4-12f7-45f8-9323-5fe529e45148/flow_runs/>'
For more information check: <https://httpstatuses.com/500>
Tried multiple but getting same 500 internal server error
k
Would you be able to give me a minimum example so I can really try to replicate?
k
Will share a similar example
It is kinda strange today that the above script is running
Sharing the link to gist below
But still cannot figure out why the one that I have posted fails
k
The one you posted still fails?