Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add networkx.generators to hidden imports #6143

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

moelasmar
Copy link
Contributor

Adding networkx.generators to hidden imports to fix the following exception that got raised in the App Templates PRs GHA

INFO     tests.integration.base:base.py:45 Stderr: 2023-10-23 22:45:07 Attaching import module proxy for analyzing dynamic imports
Dynamic import (name: networkx.generators package: None) which is not defined in hidden imports: ['samcli.lib.deploy', 'samcli.commands.build.utils', 'samcli.hook_packages.terraform', 'samcli.lib.utils.progressbar', 'samcli.cli.options', 'samcli.commands.remote.invoke.core.command', 'samcli.commands._utils.option_value_processor', 'samcli.lib.deploy.deployer', 'samcli.lib.utils.managed_cloudformation_stack', 'samcli.lib.iac', 'samcli.commands.local.start_lambda.cli', 'samcli.lib.providers', 'samcli.local', 'samcli.commands.remote.test_event.core.formatters', 'samcli.commands.package.package_context', 'samcli.commands.package.core.formatters', 'samcli.lib.cli_validation.remote_invoke_options_validations', 'samcli.lib.bootstrap.companion_stack.companion_stack_manager', 'samcli.lib.bootstrap.bootstrap', 'samcli.commands.local.start_lambda.core.options', 'samcli.commands.local.invoke.core.formatters', 'samcli.commands.local.start_api.core.options', 'samcli.lib.schemas.schemas_aws_config', 'samcli.lib.observability.xray_traces.xray_events', 'samcli.lib.docs.browser_configuration', 'samcli.lib.pipeline', 'samcli.local.apigw.local_apigw_service', 'samcli.cli.core', 'samcli.local.services.base_local_service', 'samcli.lib.list.stack_outputs.stack_outputs', 'samcli.lib.observability.xray_traces.xray_service_graph_event_puller', 'samcli.commands.remote.test_event.get.core.formatters', 'samcli.lib.bootstrap.companion_stack', 'samcli.local.docker.lambda_build_container', 'samcli.commands.local.generate_event.core.command', 'samcli.lib.telemetry.cicd', 'samcli.lib.schemas.schemas_directory_hierarchy_builder', 'samcli.cli.global_config', 'samcli.lib.remote_invoke.stepfunctions_invoke_executors', 'samcli.lib.sync.flows.layer_sync_flow', 'samcli.lib.observability.observability_info_puller', 'samcli.commands.remote.test_event.put.core', 'samcli.commands.deploy.core.options', 'samcli.lib.package', 'samcli.commands.local.start_lambda.core', 'samcli.lib.hook.hook_config', 'samcli.lib.iac.plugins_interfaces', 'samcli.commands.remote.test_event.put', 'samcli.hook_packages.terraform.hooks.prepare.resources.apigw', 'samcli.lib.list.endpoints', 'samcli.lib.utils.tar', 'samcli.commands.local.start_api.core.command', 'samcli.vendor.serverlessrepo.exceptions', 'samcli.lib.init.template_modifiers.cli_template_modifier', 'samcli.commands.local.start_api.cli', 'samcli.local.apigw.authorizers', 'samcli.hook_packages.terraform.hooks.prepare.types', 'samcli.lib.package.local_files_utils', 'samcli.commands.publish', 'samcli.local.docker.effective_user', 'samcli.lib.providers.sam_function_provider', 'samcli.settings', 'samcli.lib.hook.exceptions', 'samcli.commands.local.start_lambda.core.command', 'samcli.commands._utils.custom_options.option_nargs', 'samcli.hook_packages.terraform.hooks.prepare.resources.resource_properties', 'samcli.commands.init.init_templates', 'samcli.commands.local.lib.local_lambda', 'samcli.lib.docs.documentation', 'samcli.lib.iac.cfn', 'samcli.lib.observability', 'samcli.commands.remote.test_event.put.core.formatters', 'samcli.lib.utils.codeuri', 'samcli.lib.telemetry.event', 'samcli.lib.remote_invoke.lambda_invoke_executors', 'samcli.lib.utils.cloudformation', 'samcli.commands.logs.validation_and_exception_handlers', 'samcli.lib.utils.stream_writer', 'samcli.commands.init.command', 'samcli.commands.init.core', 'samcli.commands.pipeline.bootstrap', 'samcli.hook_packages.terraform.main', 'samcli.lib.utils.time', 'samcli.cli.main', 'samcli.commands.remote.test_event.delete', 'samcli.lib.init', 'samcli.commands.pipeline.init.cli', 'samcli.commands.remote.invoke', 'samcli.local.lambdafn.exceptions', 'samcli.lib.sync.flows.stepfunctions_sync_flow', 'samcli.commands.traces.trace_console_consumers', 'samcli.commands.list.json_consumer', 'samcli.commands.remote.test_event', 'samcli.hook_packages.terraform.hooks.prepare.resources.internal', 'samcli', 'samcli.commands._utils.template', 'samcli.commands.init.core.options', 'samcli.commands._utils.click_mutex', 'samcli.commands.init.interactive_init_flow', 'samcli.lib.config', 'samcli.lib.build', 'samcli.lib.cookiecutter', 'samcli.commands', 'samcli.lib.build.build_strategy', 'samcli.lib.build.dependency_hash_generator', 'samcli.hook_packages.terraform.hooks.prepare', 'samcli.local.docker.manager', 'samcli.hook_packages.terraform.hooks.prepare.resources.resource_links', 'samcli.cli.root', 'samcli.commands.sync.sync_context', 'samcli.hook_packages.terraform.hooks.prepare.resources.code_resource_utils', 'samcli.commands.remote.test_event.delete.core.options', 'samcli.lib.list.resources.resources_def', 'samcli.commands.build.click_container', 'samcli.hook_packages.terraform.hooks', 'samcli.lib.utils.file_observer', 'samcli.commands.validate.validate', 'samcli.lib.pipeline.bootstrap', 'samcli.commands.local.generate_event.cli', 'samcli.commands.init.core.formatters', 'samcli.commands.sync.core.formatters', 'samcli.commands.list.table_consumer', 'samcli.commands.local.lib.validators.identity_source_validator', 'samcli.commands.list.endpoints.command', 'samcli.vendor', 'samcli.lib.utils.code_trigger_factory', 'samcli.commands.docs', 'samcli.lib.intrinsic_resolver.invalid_intrinsic_exception', 'samcli.commands.deploy.exceptions', 'samcli.lib.init.default_samconfig', 'samcli.lib.list.resources.resource_mapping_producer', 'samcli.commands.init.init_generator', 'samcli.lib.delete.cfn_utils', 'samcli.commands.docs.command', 'samcli.commands.list', 'samcli.lib.intrinsic_resolver.intrinsic_property_resolver', 'samcli.commands.deploy.utils', 'samcli.commands.pipeline.bootstrap.cli', 'samcli.lib.package.permissions', 'samcli.lib.providers.cfn_base_api_provider', 'samcli.lib.observability.cw_logs.cw_log_puller', 'samcli.commands.package.exceptions', 'samcli.lib.intrinsic_resolver.intrinsics_symbol_table', 'samcli.lib.init.exceptions', 'samcli.lib.cookiecutter.interactive_flow_creator', 'samcli.commands.sync.command', 'samcli.local.events', 'samcli.lib.utils.resource_trigger', 'samcli.commands.local.lib.local_api_service', 'samcli.lib.build.constants', 'samcli.commands.remote.test_event.list.core.formatters', 'samcli.commands.validate.lib.exceptions', 'samcli.lib.sync.watch_manager', 'samcli.commands.list.resources.command', 'samcli.commands._utils.custom_options.replace_help_option', 'samcli.commands.logs.logs_context', 'samcli.lib.sync.sync_flow_factory', 'samcli.commands.logs.core', 'samcli.commands.remote.remote', 'samcli.lib.list.mapper_consumer_factory', 'samcli.local.lambda_service', 'samcli.local.docker.lambda_container', 'samcli.lib.bootstrap.companion_stack.data_types', 'samcli.lib.package.artifact_exporter', 'samcli.commands.build.core.options', 'samcli.local.lambdafn.config', 'samcli.local.lambdafn', 'samcli.commands.list.stack_outputs', 'samcli.commands.delete.command', 'samcli.lib.utils', 'samcli.commands.remote.test_event.delete.core', 'samcli.lib.build.utils', 'samcli.lib.constants', 'samcli.commands.traces.traces_puller_factory', 'samcli.cli.root.command_list', 'samcli.lib.package.uploaders', 'samcli.commands.list.list', 'samcli.commands.list.stack_outputs.stack_outputs_context', 'samcli.commands.package.command', 'samcli.commands.remote.test_event.list.core', 'samcli.lib.build.build_graph', 'samcli.lib.telemetry', 'samcli.lib.docs', 'samcli.commands.traces.command', 'samcli.lib.sync.continuous_sync_flow_executor', 'samcli.lib.build.workflows', 'samcli.lib.iac.cfn.cfn_iac', 'samcli.hook_packages.terraform.hooks.prepare.enrich', 'samcli.commands._utils.custom_options.hook_name_option', 'samcli.commands.list.resources', 'samcli.commands.remote.test_event.list.cli', 'samcli.lib.utils.definition_validator', 'samcli.lib.utils.system_info', 'samcli.lib.sync.flows.alias_version_sync_flow', 'samcli.commands.sync.core', 'samcli.lib.config.file_manager', 'samcli.lib.sync.flows', 'samcli.cli.core.command', 'samcli.commands.remote.invoke.core', 'samcli.commands.build.command', 'samcli.commands.build.core.formatters', 'samcli.commands._utils.constants', 'samcli.commands.remote.exceptions', 'samcli.local.layers.layer_downloader', 'samcli.local.lambdafn.env_vars', 'samcli.local.apigw.route', 'samcli.commands.pipeline.init.interactive_init_flow', 'samcli.lib.list.stack_outputs.stack_outputs_producer', 'samcli.commands.remote.test_event.list.core.options', 'samcli.local.apigw.exceptions', 'samcli.commands.local.lib.validators.lambda_auth_props', 'samcli.commands.local.cli_common.user_exceptions', 'samcli.lib.remote_invoke.remote_invoke_executors', 'samcli.hook_packages.terraform.hooks.prepare.resource_linking', 'samcli.commands._utils.custom_options', 'samcli.lib.list.list_interfaces', 'samcli.commands.remote.test_event.core.base_options', 'samcli.hook_packages.terraform.lib', 'samcli.commands.validate', 'samcli.local.docker.exceptions', 'samcli.local.apigw', 'samcli.commands.remote.test_event.delete.core.formatters', 'samcli.lib.sync.sync_flow', 'samcli.lib.utils.preview_runtimes', 'samcli.commands.local.lib.local_lambda_service', 'samcli.commands.build.core.command', 'samcli.lib.cookiecutter.question', 'samcli.lib.list.endpoints.endpoints_to_table_mapper', 'samcli.commands._utils.experimental', 'samcli.lib.warnings', 'samcli.lib.bootstrap', 'samcli.lib.observability.util', 'samcli.lib.cookiecutter.exceptions', 'samcli.commands.list.endpoints.endpoints_context', 'samcli.lib.iac.iac_factory', 'samcli.commands.remote.test_event.put.core.options', 'samcli.commands.local.lib.swagger.reader', 'samcli.lib.utils.profile', 'samcli.commands.delete.delete_context', 'samcli.commands.bootstrap', 'samcli.lib.cookiecutter.template', 'samcli.lib.list.resources.resources_to_table_mapper', 'samcli.hook_packages.terraform.hooks.prepare.makefile_generator', 'samcli.lib.sync', 'samcli.lib.providers.cfn_api_provider', 'samcli.lib.sync.flows.rest_api_sync_flow', 'samcli.lib.schemas.schemas_code_manager', 'samcli.commands.remote.test_event.core', 'samcli.commands.remote.remote_invoke_context', 'samcli.lib.build.exceptions', 'samcli.local.apigw.path_converter', 'samcli.lib.cookiecutter.processor', 'samcli.commands.local.start_api.core', 'samcli.lib.utils.version_checker', 'samcli.commands.local.lib.exceptions', 'samcli.lib.telemetry.metric', 'samcli.lib.package.ecr_uploader', 'samcli.commands.validate.core.formatters', 'samcli.lib.bootstrap.stack_builder', 'samcli.vendor.serverlessrepo.parser', 'samcli.local.docker', 'samcli.hook_packages.terraform.hooks.prepare.exceptions', 'samcli.commands.deploy.command', 'samcli.lib.config.samconfig', 'samcli.lib.utils.sam_logging', 'samcli.commands.init.interactive_event_bridge_flow', 'samcli.lib.cookiecutter.plugin', 'samcli.lib.delete', 'samcli.lib.docker.log_streamer', 'samcli.lib.hook', 'samcli.lib.shared_test_events.lambda_shared_test_event', 'samcli.lib.telemetry.user_agent', 'samcli.commands.list.cli_common.options', 'samcli.commands.sync', 'samcli.lib.pipeline.bootstrap.resource', 'samcli.commands.remote.test_event.get', 'samcli.cli.types', 'samcli.commands.logs.console_consumers', 'samcli.lib.utils.hash', 'samcli.lib.shared_test_events', 'samcli.lib.utils.retry', 'samcli.commands.remote.test_event.delete.cli', 'samcli.commands.validate.core.options', 'samcli.lib.generated_sample_events.events', 'samcli.local.docker.container', 'samcli.commands._utils.options', 'samcli.cli.import_module_proxy', 'samcli.lib.sync.flows.generic_api_sync_flow', 'samcli.lib.sync.sync_flow_executor', 'samcli.vendor.serverlessrepo', 'samcli.lib.init.arbitrary_project', 'samcli.commands.local.lib.swagger.integration_uri', 'samcli.lib.bootstrap.companion_stack.companion_stack_builder', 'samcli.commands.pipeline', 'samcli.commands.init', 'samcli.commands.package', 'samcli.lib.schemas.schemas_cli_message_generator', 'samcli.commands.local.lib.validators', 'samcli.local.services', 'samcli.commands.list.cli_common.list_common_context', 'samcli.lib.cli_validation', 'samcli.commands._utils', 'samcli.commands.logs.core.options', 'samcli.lib.bootstrap.nested_stack', 'samcli.lib.telemetry.project_metadata', 'samcli.lib.utils.s3', 'samcli.commands.remote.test_event.get.core', 'samcli.commands.logs', 'samcli.lib.pipeline.bootstrap.stage', 'samcli.lib.utils.graphql_api', 'samcli.lib.cookiecutter.interactive_flow', 'samcli.lib.list', 'samcli.lib.providers.sam_layer_provider', 'samcli.local.layers', 'samcli.lib.config.exceptions', 'samcli.vendor.serverlessrepo.publish', 'samcli.commands._utils.option_validator', 'samcli.lib.docker', 'samcli.lib.package.image_utils', 'samcli.commands.local.cli_common.invoke_context', 'samcli.commands.remote.test_event.get.cli', 'samcli.commands.pipeline.bootstrap.oidc_config', 'samcli.hook_packages.terraform.hooks.prepare.resources', 'samcli.hook_packages.terraform.hooks.prepare.resources.lambda_layers', 'samcli.lib.schemas.cli_paginator', 'samcli.lib.iac.cdk', 'samcli.lib.samlib.local_uri_plugin', 'samcli.commands.remote.test_event.utils', 'samcli.commands.package.core.options', 'samcli.lib.observability.cw_logs.cw_log_group_provider', 'samcli.commands.build', 'samcli.commands.local.lib.swagger.parser', 'samcli.lib.providers.sam_api_provider', 'samcli.lib.utils.packagetype', 'samcli.local.docker.lambda_image', 'samcli.lib.utils.path_utils', 'samcli.lib.init.template_modifiers.xray_tracing_template_modifier', 'samcli.commands.remote.test_event.get.core.options', 'samcli.commands.local.start_api', 'samcli.local.common', 'samcli.lib.observability.xray_traces.xray_event_puller', 'samcli.lib.bootstrap.nested_stack.nested_stack_manager', 'samcli.lib.sync.infra_sync_executor', 'samcli.cli', 'samcli.commands.delete', 'samcli.lib.package.stream_cursor_utils', 'samcli.commands.deploy.deploy_context', 'samcli.local.apigw.event_constructor', 'samcli.commands.pipeline.external_links', 'samcli.lib.package.s3_uploader', 'samcli.cli.context', 'samcli.commands.list.resources.resources_context', 'samcli.lib.providers.api_collector', 'samcli.local.lambdafn.zip', 'samcli.commands.docs.exceptions', 'samcli.commands.local.invoke.cli', 'samcli.commands.deploy.guided_config', 'samcli.lib.utils.osutils', 'samcli.commands.docs.command_context', 'samcli.commands.docs.core', 'samcli.commands.logs.core.command', 'samcli.commands.docs.core.command', 'samcli.commands.local.generate_event.core', 'samcli.lib.utils.async_utils', 'samcli.lib.samlib.wrapper', 'samcli.commands.list.endpoints', 'samcli.lib.cli_validation.image_repository_validation', 'samcli.lib.package.code_signer', 'samcli.commands.local.lib', 'samcli.local.lambda_service.local_lambda_invoke_service', 'samcli.lib.build.bundler', 'samcli.commands.build.build_context', 'samcli.lib.sync.flows.http_api_sync_flow', 'samcli.lib.utils.git_repo', 'samcli.commands.pipeline.pipeline', 'samcli.lib.build.app_builder', 'samcli.lib.iac.exceptions', 'samcli.cli.core.options', 'samcli.commands.local.invoke', 'samcli.commands.pipeline.init.pipeline_templates_manifest', 'samcli.lib.providers.exceptions', 'samcli.commands.build.core', 'samcli.lib.list.stack_outputs.stack_output_to_table_mapper', 'samcli.commands.sync.core.options', 'samcli.lib.package.packageable_resources', 'samcli.lib.iac.cdk.utils', 'samcli.lib.hook.utils', 'samcli.lib.samlib', 'samcli.commands.deploy.guided_context', 'samcli.lib.warnings.sam_cli_warning', 'samcli.lib.observability.xray_traces', 'samcli.__main__', 'samcli.lib.schemas.schemas_constants', 'samcli.commands.remote.invoke.core.formatters', 'samcli.hook_packages.terraform.lib.utils', 'samcli.lib.translate', 'samcli.hook_packages.terraform.hooks.prepare.hook', 'samcli.commands.local.start_api.core.formatters', 'samcli.commands.validate.lib', 'samcli.commands.local.start_lambda', 'samcli.lib.iac.constants', 'samcli.lib.utils.path_observer', 'samcli.commands.delete.exceptions', 'samcli.lib.remote_invoke.sqs_invoke_executors', 'samcli.lib.telemetry.telemetry', 'samcli.cli.hidden_imports', 'samcli.commands.deploy.auth_utils', 'samcli.lib.utils.arn_utils', 'samcli.commands.pipeline.init', 'samcli.lib.remote_invoke.remote_invoke_executor_factory', 'samcli.local.lambdafn.remote_files', 'samcli.local.lambda_service.lambda_error_responses', 'samcli.lib.utils.boto_utils', 'samcli.hook_packages.terraform.hooks.prepare.property_builder', 'samcli.commands.deploy.core.formatters', 'samcli.commands._utils.parameterized_option', 'samcli.lib.utils.architecture', 'samcli.local.common.runtime_template', 'samcli.lib.deploy.utils', 'samcli.local.lambdafn.runtime', 'samcli.lib.translate.sam_template_validator', 'samcli.commands.list.cli_common', 'samcli.commands.deploy.core', 'samcli.cli.command', 'samcli.lib.intrinsic_resolver', 'samcli.local.docker.utils', 'samcli.lib.intrinsic_resolver.invalid_intrinsic_validation', 'samcli.commands.list.stack_outputs.command', 'samcli.hook_packages.terraform.hooks.prepare.resources.lambda_function', 'samcli.commands.local.generate_event.event_generation', 'samcli.commands.validate.core.command', 'samcli.commands.local.invoke.core.command', 'samcli.commands._utils.command_exception_handler', 'samcli.local.docker.lambda_debug_settings', 'samcli.hook_packages.terraform.hooks.prepare.translate', 'samcli.lib.utils.resources', 'samcli.lib.config.version', 'samcli.lib.providers.api_provider', 'samcli.commands.local.start_lambda.core.formatters', 'samcli.lib.schemas', 'samcli.lib.remote_invoke', 'samcli.commands.local.lib.swagger', 'samcli.lib.utils.resource_type_based_factory', 'samcli.cli.cli_config_file', 'samcli.lib.list.endpoints.endpoints_def', 'samcli.lib.init.template_modifiers', 'samcli.commands.build.exceptions', 'samcli.lib.sync.flows.zip_function_sync_flow', 'samcli.lib.providers.sam_base_provider', 'samcli.lib.hook.hook_wrapper', 'samcli.commands.deploy', 'samcli.local.apigw.service_error_responses', 'samcli.commands.init.init_flow_helpers', 'samcli.lib.list.stack_outputs', 'samcli.lib.generated_sample_events', 'samcli.yamlhelper', 'samcli.commands.package.core.command', 'samcli.commands.remote.test_event.delete.core.command', 'samcli.local.apigw.authorizers.authorizer', 'samcli.cli.row_modifiers', 'samcli.commands.package.core', 'samcli.lib.iac.cdk.cdk_iac', 'samcli.commands.remote.test_event.put.core.command', 'samcli.commands.local', 'samcli.lib.list.resources', 'samcli.commands.local.invoke.core', 'samcli.commands.docs.core.formatter', 'samcli.commands.logs.core.formatters', 'samcli.lib.utils.configuration', 'samcli.commands.validate.core', 'samcli.commands.remote.invoke.core.options', 'samcli.hook_packages.terraform.copy_terraform_built_artifacts', 'samcli.commands.pipeline.bootstrap.pipeline_oidc_provider', 'samcli.local.events.api_event', 'samcli.lib.observability.xray_traces.xray_event_mappers', 'samcli.commands.bootstrap.command', 'samcli.lib.utils.defaults', 'samcli.commands.list.exceptions', 'samcli.commands.remote', 'samcli.lib', 'samcli.lib.sync.exceptions', 'samcli.lib.package.ecr_utils', 'samcli.commands.logs.puller_factory', 'samcli.lib.list.mapper_consumer_container', 'samcli.lib.bootstrap.nested_stack.nested_stack_builder', 'samcli.lib.init.template_modifiers.application_insights_template_modifier', 'samcli.lib.observability.cw_logs', 'samcli.lib.build.workflow_config', 'samcli.commands.logs.command', 'samcli.vendor.serverlessrepo.application_metadata', 'samcli.commands.remote.test_event.put.cli', 'samcli.commands.traces', 'samcli.commands.pipeline.bootstrap.guided_context', 'samcli.commands._utils.table_print', 'samcli.commands.init.core.command', 'samcli.commands.deploy.core.command', 'samcli.lib.utils.lock_distributor', 'samcli.lib.utils.colors', 'samcli.lib.remote_invoke.exceptions', 'samcli.lib.package.utils', 'samcli.lib.schemas.schemas_api_caller', 'samcli.commands.exceptions', 'samcli.commands._utils.cdk_support_decorators', 'samcli.lib.sync.flows.image_function_sync_flow', 'samcli.commands.local.generate_event', 'samcli.commands.publish.command', 'samcli.commands.remote.test_event.list', 'samcli.hook_packages', 'samcli.lib.sync.flows.function_sync_flow', 'samcli.commands.local.lib.debug_context', 'samcli.lib.remote_invoke.kinesis_invoke_executors', 'samcli.commands.remote.invoke.cli', 'samcli.commands.remote.test_event.get.core.command', 'samcli.commands.remote.test_event.test_event', 'samcli.commands.local.cli_common', 'samcli.lib.observability.cw_logs.cw_log_event', 'samcli.lib.utils.subprocess_utils', 'samcli.lib.samlib.resource_metadata_normalizer', 'samcli.commands.sync.core.command', 'samcli.hook_packages.terraform.hooks.prepare.constants', 'samcli.commands.local.cli_common.options', 'samcli.commands.remote.test_event.list.core.command', 'samcli.commands.local.local', 'samcli.lib.observability.cw_logs.cw_log_formatters', 'samcli.local.apigw.authorizers.lambda_authorizer', 'samcli.lib.sync.flows.auto_dependency_layer_sync_flow', 'samcli.hook_packages.terraform.hooks.prepare.utilities', 'samcli.lib.list.data_to_json_mapper', 'samcli.lib.providers.sam_stack_provider', 'samcli.commands.local.invoke.core.options', 'samcli.lib.providers.provider', 'samcli.lib.list.endpoints.endpoints_producer', 'samcli.commands.deploy.code_signer_utils', 'samcli.cli.formatters', 'cookiecutter.extensions', 'text_unidecode', 'samtranslator', 'pkg_resources.py2_warn', 'aws_lambda_builders.workflows', 'configparser', 'dateparser', 'jsonschema', 'cfnlint']

Error: Dynamic import not allowed for name: networkx.generators package: None
Traceback:
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/cli/cli_config_file.py", line 347, in wrapper
    return func(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/lib/telemetry/metric.py", line 184, in wrapped
    raise exception  # pylint: disable=raising-bad-type
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/lib/telemetry/metric.py", line 149, in wrapped
    return_value = func(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/lib/utils/version_checker.py", line 42, in wrapped
    actual_result = func(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/cli/main.py", line 95, in wrapper
    return func(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/_utils/cdk_support_decorators.py", line 39, in wrapped
    return func(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/_utils/command_exception_handler.py", line 88, in wrapper_command_exception_handler
    raise ex
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/_utils/command_exception_handler.py", line 68, in wrapper_command_exception_handler
    return func(*args, **kwargs)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/validate/validate.py", line 59, in cli
    do_cli(ctx, template_file, lint)  # pragma: no cover
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/validate/validate.py", line 74, in do_cli
    _lint(ctx, template)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/commands/validate/validate.py", line 147, in _lint
    import cfnlint.core  # type: ignore
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/cfnlint/__init__.py", line 9, in <module>
    import cfnlint.rules
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/cfnlint/rules/__init__.py", line 17, in <module>
    from cfnlint.template import Template
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/cfnlint/template/__init__.py", line 1, in <module>
    from cfnlint.template.template import Template
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/cfnlint/template/template.py", line 15, in <module>
    from cfnlint.graph import Graph
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/cfnlint/graph.py", line 11, in <module>
    import networkx
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/networkx/__init__.py", line 35, in <module>
    from networkx import generators
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/networkx/generators/__init__.py", line 5, in <module>
    from networkx.generators.atlas import *
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/networkx/generators/atlas.py", line 54, in <module>
    ATLAS_FILE = importlib.resources.files("networkx.generators") / "atlas.dat.gz"
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/_common.py", line 22, in files
    return from_package(get_package(package))
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/_common.py", line 66, in get_package
    resolved = resolve(package)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/_common.py", line 57, in resolve
    return cand if isinstance(cand, types.ModuleType) else importlib.import_module(cand)
  File "/home/runner/work/aws-sam-cli-app-templates/aws-sam-cli-app-templates/aws-sam-cli-develop/samcli/cli/import_module_proxy.py", line 45, in _dynamic_import
    raise MissingDynamicImportError(f"Dynamic import not allowed for name: {name} package: {package}")

An unexpected error was encountered while executing "samdev validate".
Search for an existing issue:
https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20samdev%20validate%20-%20MissingDynamicImportError
Or create a bug report:
https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20samdev%20validate%20-%20MissingDynamicImportError

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hnnasit hnnasit added this pull request to the merge queue Nov 6, 2023
Merged via the queue into aws:develop with commit b8d372a Nov 6, 2023
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants