Suhani Goel
04/27/2023, 6:41 PMError loading core_extract. Try reloading the code location after resolving the issue.
AttributeError: __enter__
File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/server.py", line 267, in __init__
self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories(
File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/server.py", line 116, in __init__
loadable_targets = get_loadable_targets(
File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/utils.py", line 37, in get_loadable_targets
else loadable_targets_from_python_file(python_file, working_directory)
File "/usr/local/lib/python3.10/site-packages/dagster/_core/workspace/autodiscovery.py", line 27, in loadable_targets_from_python_file
loaded_module = load_python_file(python_file, working_directory)
File "/usr/local/lib/python3.10/site-packages/dagster/_core/code_pointer.py", line 86, in load_python_file
return import_module_from_path(module_name, python_file)
File "/usr/local/lib/python3.10/site-packages/dagster/_seven/__init__.py", line 49, in import_module_from_path
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/scripts/pipelines/core/extract/__init__.py", line 8, in <module>
from pipelines.core.extract.assets.chain import factory_outputs as chain_factory_outputs
File "/scripts/pipelines/core/extract/__init__.py", line 8, in <module>
from pipelines.core.extract.assets.chain import factory_outputs as chain_factory_outputs
File "/scripts/pipelines/core/extract/assets/chain/__init__.py", line 1, in <module>
from .chain import factory_outputs as chain_factory_outputs
File "/scripts/pipelines/core/extract/assets/chain/chain.py", line 57, in <module>
end_block = get_current_block() - block_partition_size,
File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/assets.py", line 245, in __call__
return solid_def(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/op_definition.py", line 439, in __call__
return op_invocation_result(self, None, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/solid_invocation.py", line 60, in op_invocation_result
result = invoke_compute_fn(
File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/compute_generator.py", line 115, in invoke_compute_fn
return fn(context, **args_to_pass) if context_arg_provided else fn(**args_to_pass)
File "/scripts/pipelines/core/extract/assets/chain/chain.py", line 33, in get_current_block
with flow_client( host="<http://access.mainnet.nodes.onflow.org|access.mainnet.nodes.onflow.org>", port="9000") as client:
alex
04/27/2023, 6:58 PMasset
at import time which you probably dont want, notable stack trace line:
File "/scripts/pipelines/core/extract/assets/chain/chain.py", line 57, in <module>
end_block = get_current_block() -
Suhani Goel
04/28/2023, 5:26 AMalex
04/28/2023, 2:14 PMSuhani Goel
04/28/2023, 2:49 PMwith flow_client( host="<http://access.mainnet.nodes.onflow.org|access.mainnet.nodes.onflow.org>", port="9000") as client:
block = client.get_latest_block(is_sealed = True)
return block.height