https://dagster.io/ logo
#ask-ai
Title
# ask-ai
m

Marcel Steinbach

03/07/2024, 5:07 PM
My backfill is still in progress but it's marked as "Failed" with an error
Copy code
AttributeError: 'NoneType' object has no attribute 'tags'
s

Scout

03/07/2024, 5:07 PM
It seems like you're encountering an error during the execution of a backfill in Dagster. The error message
AttributeError: 'NoneType' object has no attribute 'tags'
suggests that somewhere in the code, there is an attempt to access the
tags
attribute on an object that is
None
. To help you debug this issue, here are a few steps you can take: 1. Check the Code: Look at the part of your code where
tags
are being accessed. Ensure that the object you're trying to access
tags
from is not
None
. If this is happening within a Dagster framework code, it might be a bug or an unexpected state. 2. Review the Stack Trace: The error message should come with a stack trace that points to the specific line of code where the error occurred. This can give you a clue about where the
NoneType
object is coming from. 3. Check for Recent Changes: If this backfill was working before, consider any recent changes to the codebase or the environment that might have introduced this issue. 4. Consult the Documentation: Review the Dagster documentation for the correct usage of backfills and any related configurations that might affect the execution. 5. Search for Similar Issues: Look for similar issues in the Dagster Github Issues or Discussions to see if others have encountered and resolved a similar problem. 6. Report the Issue: If you believe this is a bug with Dagster, you can report it on the Dagster Github Issues page with detailed information, including the full error message, stack trace, and the context in which the error occurs. Unfortunately, without more context or a specific reference in the documentation, I cannot provide a more precise solution. If you continue to face difficulties, consider providing additional details or reaching out to the Dagster community for further assistance.
m

Marcel Steinbach

03/07/2024, 5:08 PM
@Scout this is in dagster code
Copy code
AttributeError: 'NoneType' object has no attribute 'tags'
  File "/usr/local/lib/python3.10/site-packages/dagster/_daemon/backfill.py", line 49, in execute_backfill_jobs
    yield from execute_asset_backfill_iteration(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/asset_backfill.py", line 917, in execute_asset_backfill_iteration
    for result in execute_asset_backfill_iteration_inner(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/asset_backfill.py", line 1217, in execute_asset_backfill_iteration_inner
    for updated_materialized_subset in get_asset_backfill_iteration_materialized_partitions(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/asset_backfill.py", line 1119, in get_asset_backfill_iteration_materialized_partitions
    records_in_backfill = [
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/asset_backfill.py", line 1122, in <listcomp>
    if instance_queryer.run_has_tag(
  File "/usr/local/lib/python3.10/site-packages/dagster/_utils/caching_instance_queryer.py", line 386, in run_has_tag
    run_tags = cast(DagsterRun, self._get_run_by_id(run_id)).tags
s

Scout

03/07/2024, 5:08 PM
The stack trace you've provided indicates that the error is occurring within Dagster's internal code for executing asset backfills. Specifically, it seems to be failing when trying to access the
tags
attribute of a
DagsterRun
object, which is unexpectedly
None
. Given that this is happening within Dagster's code, here are some steps you can take to troubleshoot the issue: 1. Ensure Dagster Version is Up-to-Date: Make sure you are using the latest version of Dagster, as the issue might have been fixed in a more recent release. 2. Check DagsterRun Object: The error suggests that the
DagsterRun
object retrieved by
_get_run_by_id
is
None
. This could happen if there is no run with the given
run_id
, or if there's an issue with the retrieval process. Verify that the
run_id
being passed is correct and that the run exists in the system. 3. Review Custom Code: If you have any custom code that interacts with the DagsterRun storage or tags, ensure it is functioning correctly and not leading to this situation. 4. Check System Configuration: Ensure that your Dagster instance and run storage are correctly configured and operational. Issues with the underlying storage could lead to problems retrieving run information. 5. Search for Known Issues: Look for any known issues in the Dagster Github repository that match the error you're encountering. It's possible that this is a known bug with an ongoing discussion or fix. 6. Report the Issue: If after checking the above steps the problem persists, consider reporting the issue on the Dagster Github Issues page. Provide the full error message, stack trace, and details about your environment and Dagster version. This will help the Dagster maintainers to diagnose and address the issue. 7. Seek Community Help: You can also seek help from the Dagster community by posting on the Dagster Slack or the Github Discussions page. Other users or contributors may have encountered similar issues and can offer guidance. Remember to include as much relevant information as possible when seeking help or reporting the issue, such as the Dagster version, deployment environment, and any relevant configuration details.
2 Views