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

AttributeError: module 'ruamel.yaml' has no attribute 'SafeDumper' #422

Closed
Almaz97 opened this issue Jul 26, 2019 · 2 comments
Closed

AttributeError: module 'ruamel.yaml' has no attribute 'SafeDumper' #422

Almaz97 opened this issue Jul 26, 2019 · 2 comments

Comments

@Almaz97
Copy link

@Almaz97 Almaz97 commented Jul 26, 2019

Hello! After docker image build, trying to run containers via docker-compose up, and facing error:

Traceback (most recent call last):
django_1 | File "manage.py", line 21, in
django_1 | main()
django_1 | File "manage.py", line 17, in main
django_1 | execute_from_command_line(sys.argv)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
django_1 | utility.execute()
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
django_1 | self.fetch_command(subcommand).run_from_argv(self.argv)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
django_1 | self.execute(*args, **cmd_options)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 361, in execute
django_1 | self.check()
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 390, in check
django_1 | include_deployment_checks=include_deployment_checks,
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks
django_1 | issues.extend(super()._run_checks(**kwargs))
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 377, in _run_checks
django_1 | return checks.run_checks(**kwargs)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks
django_1 | new_errors = check(app_configs=app_configs)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 13, in check_url_config
django_1 | return check_resolver(resolver)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 23, in check_resolver
django_1 | return check_method()
django_1 | File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 398, in check
django_1 | for pattern in self.url_patterns:
django_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 80, in get
django_1 | res = instance.dict[self.name] = self.func(instance)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 579, in url_patterns
django_1 | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 80, in get
django_1 | res = instance.dict[self.name] = self.func(instance)
django_1 | File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 572, in urlconf_module
django_1 | return import_module(self.urlconf_name)
django_1 | File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module
django_1 | return _bootstrap._gcd_import(name[level:], package, level)
django_1 | File "", line 994, in _gcd_import
django_1 | File "", line 971, in _find_and_load
django_1 | File "", line 955, in _find_and_load_unlocked
django_1 | File "", line 665, in _load_unlocked
django_1 | File "", line 678, in exec_module
django_1 | File "", line 219, in _call_with_frames_removed
django_1 | File "/app/config/urls.py", line 20, in
django_1 | from drf_yasg.views import get_schema_view
django_1 | File "/usr/local/lib/python3.6/site-packages/drf_yasg/views.py", line 14, in
django_1 | from .renderers import (
django_1 | File "/usr/local/lib/python3.6/site-packages/drf_yasg/renderers.py", line 11, in
django_1 | from .codecs import VALIDATORS, OpenAPICodecJson, OpenAPICodecYaml
django_1 | File "/usr/local/lib/python3.6/site-packages/drf_yasg/codecs.py", line 133, in
django_1 | class SaneYamlDumper(yaml.SafeDumper):
django_1 | AttributeError: module 'ruamel.yaml' has no attribute 'SafeDumper'

@nicholasgcoles

This comment has been minimized.

Copy link

@nicholasgcoles nicholasgcoles commented Jul 26, 2019

@Almaz97 check my issue I posted here #423

There is a simple fix.

edwardoliveira added a commit to interlegis/sapl that referenced this issue Jul 31, 2019
cesaraugc added a commit to interlegis/sapl that referenced this issue Jul 31, 2019
@axnsan12

This comment has been minimized.

Copy link
Owner

@axnsan12 axnsan12 commented Sep 29, 2019

Seems to have been fixed in later versions of ruamel.yaml (0.16.5 works)

@axnsan12 axnsan12 closed this Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.