Charles Leung

09/14/2023, 8:56 PM
Hi @Prefect, I get this weird error on the agent console whenever I kick things off. It looks like it's trying to write things to prefect.log at the same time. This error occurs when I use the .submit() task and multiple tasks are kicking off in the same flow. How do we get around this so everything is populated correctly?
Copy code
--- Logging error ---
Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\logging\", line 70, in emit
  File "\\v-tm-qeq-05\Prefect_Env\lib\logging\", line 171, in doRollover
    self.rotate(self.baseFilename, dfn)
  File "\\v-tm-qeq-05\Prefect_Env\lib\logging\", line 111, in rotate
    os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\qtask\\prefect.log' -> 'C:\\Users\\qtask\\prefect.log.1'
Call stack:
  File "\\v-tm-qeq-05\Prefect_Env\lib\", line 890, in _bootstrap
  File "\\v-tm-qeq-05\Prefect_Env\lib\", line 932, in _bootstrap_inner
  File "\\v-tm-qeq-05\Prefect_Env\lib\", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\prefect\_internal\concurrency\", line 90, in _entrypoint
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\prefect\_internal\concurrency\", line 105, in _run_until_shutdown
    task =
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\prefect\_internal\concurrency\", line 272, in run
    return, self._run_async(coro))
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 44, in run
    return loop.run_until_complete(main)
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 603, in run_until_complete
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 316, in run_forever
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 570, in run_forever
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 1859, in _run_once
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\", line 81, in _run, *self._args)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\prefect\_internal\concurrency\", line 345, in _run_async
    result = await coro
  File "Script\", line 96, in async_query
Message: 'DISPATCHED Task: prepareDataAggIbesAis'