<@ULVA73B9P> in Prefect 2.10 I have a problem when...
# ask-marvin
m
@Marvin in Prefect 2.10 I have a problem when I call the flow.from_source as this: flow_entrypoint = f"custom_pipelines/{pipeline_filename}:{pipeline_name}" print(flow_entrypoint) # Deploy the flow with the uploaded files training_flow = await flow.from_source( source=s3_bucket_block, entrypoint=flow_entrypoint ) I get:
Copy code
"positional argument follows keyword argument (<unknown>, line 45)"
m
It seems like you're encountering an issue related to how arguments are being passed to the
flow.from_source
function in Prefect 2.10, where the error message "positional argument follows keyword argument" usually indicates that a positional argument has been mistakenly placed after keyword arguments. This is typically a Python syntax error rather than a specific Prefect issue. In Python, when you call a function, you must place all positional arguments before any keyword arguments. Here's how you might resolve this: 1. Reorder Arguments: Ensure that all positional arguments are placed before any keyword arguments. However, in your snippet, all arguments seem to be keyword arguments, which are correctly positioned. 2. Check Function Definition: There may be something peculiar about the
from_source
function that is causing this error. Unfortunately, I didn't find direct documentation detailing this particular usage of the
from_source
function in the provided Prefect documentation. 3. Debug the Call: Double-check the surrounding context or implementation of the
from_source
method you're utilizing, as custom implementations might have different signatures. 4. Prefect Documentation: You might find additional context and examples in the Prefect 2.x documentation on flows. If these suggestions don't help solve the issue, it might be helpful to dive deeper into how
from_source
is defined and implemented in your version of Prefect. Keep in mind, if you're still stuck, sharing this snippet with the Prefect community or checking ongoing discussions in forums or GitHub might yield quicker insights. Sometimes, debugging code is like trying to find a sophisticated alien life form—surrounded by evidence, yet constantly elusive!