https://dagster.io/ logo
#ask-community
Title
# ask-community
t

Thomas

06/07/2023, 8:37 PM
Hi! I have an error which I do not understand. Can somebody help me? My code is this:
Copy code
from dagster import asset, Definitions, FilesystemIOManager, OpExecutionContext

@asset()
def test1():
    return 6
And the error is this:
Copy code
An exception was thrown during execution that is likely a framework error, rather than an error in user code.
dagster._core.errors.DagsterInvalidSubsetError: Assets provided in asset_selection argument ["asset_1"] do not exist in parent asset group or job.
  File "/usr/local/lib/python3.8/site-packages/dagster/_grpc/impl.py", line 137, in core_execute_run
    yield from execute_run_iterator(
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/api.py", line 866, in __iter__
    yield from self.execution_context_manager.prepare_context()
  File "/usr/local/lib/python3.8/site-packages/dagster/_utils/__init__.py", line 491, in generate_setup_events
    obj = next(self.generator)
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/context_creation_job.py", line 291, in orchestration_context_event_generator
    context_creation_data = create_context_creation_data(
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/context_creation_job.py", line 105, in create_context_creation_data
    job_def = job.get_definition()
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/reconstruct.py", line 257, in get_definition
    return self.repository.get_definition().get_maybe_subset_job_def(
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/repository_definition/repository_definition.py", line 277, in get_maybe_subset_job_def
    return defn.get_subset(op_selection=op_selection, asset_selection=asset_selection)
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/job_definition.py", line 722, in get_subset
    return self._get_job_def_for_asset_selection(asset_selection)
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/job_definition.py", line 744, in _get_job_def_for_asset_selection
    raise DagsterInvalidSubsetError(
s

sandy

06/07/2023, 8:44 PM
Hi Thomas - your asset is named "test1", but the error claims that you're trying to select an asset named "asset_1" somewhere. Should these be the same in your case?
t

Thomas

06/07/2023, 9:09 PM
@sandy hi! My file only exists of test1. I used to have asset_1, but I deleted this to make a minimal reproducible example.
@sandy The main problem seems to be that it is another code-server, in the other server I have been able to run all sorts of things but in the new one not a single run.
s

sandy

06/07/2023, 9:25 PM
In the UI, you might need to hit the button that reloads your code locations
t

Thomas

06/07/2023, 9:37 PM
@sandy That partly helped:
dagster._core.errors.DagsterInvalidSubsetError: Assets provided in asset_selection argument ["test1"] do not exist in parent asset group or job.
. It is now correctly test1 but still the same error.
s

sandy

06/07/2023, 10:14 PM
Are you using
define_asset_job
? Or launching from the UI?
t

Thomas

06/15/2023, 2:35 PM
Hi @sandy sorry for the late reply. I am running it from the UI. Another thing I can imagine is that I call some support functions which have their own parameters. Could that be an issue?
s

sandy

06/15/2023, 6:41 PM
are you able to supply a more complete example that triggers the issue? if I run that code, it works fine for me
t

Thomas

06/16/2023, 9:40 AM
I found the issue. I had two code servers with both their configuration in the top-level folder. Then in the docker image for one, I copied the actual workflow code from the other. Therefore it could not find it. And since I had mounting on, sometimes when I updated the code, it ‘magically’ worked again… But it’s fixed!
s

sandy

06/16/2023, 3:15 PM
awesome