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

Issues with ruamel.yaml #39

Open
bakhtos opened this issue Oct 21, 2024 · 1 comment
Open

Issues with ruamel.yaml #39

bakhtos opened this issue Oct 21, 2024 · 1 comment

Comments

@bakhtos
Copy link
Contributor

bakhtos commented Oct 21, 2024

Traceback (most recent call last):
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 115, in <module>
    cli_invocation()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 111, in cli_invocation
    perform_analysis()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/dfd_extraction.py", line 74, in perform_analysis
    codeable_models, traceability_content = DFD_extraction()
                                            ^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/dfd_extraction.py", line 89, in DFD_extraction
    microservices = tech_sw.get_microservices(dfd)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/technology_switch.py", line 28, in get_microservices
    dcm.set_microservices(dfd)
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/docker_compose/dcm_entry.py", line 36, in set_microservices
    microservices_set, properties_dict = dcm_parser.extract_microservices(docker_compose_content, raw_files[0]["path"])
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/docker_compose/dcm_parser.py", line 66, in extract_microservices
    file = yaml.load(file_content)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/main.py", line 451, in load
    return constructor.get_single_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 116, in get_single_data
    return self.construct_document(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 125, in construct_document
    for _dummy in generator:
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
    self.construct_mapping(node, data, deep=True)
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1365, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
    data = self.construct_non_recursive_object(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
    for _dummy in generator:
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
    self.construct_mapping(node, data, deep=True)
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1365, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
    data = self.construct_non_recursive_object(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
    for _dummy in generator:
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1476, in construct_yaml_map
    self.construct_mapping(node, data, deep=True)
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1365, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
    data = self.construct_non_recursive_object(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
    for _dummy in generator:
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1469, in construct_yaml_seq
    data.extend(self.construct_rt_sequence(node, data))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1217, in construct_rt_sequence
    ret_val.append(self.construct_object(child, deep=deep))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
    data = self.construct_non_recursive_object(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 181, in construct_non_recursive_object
    data = constructor(self, node)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/envs/code2DFD/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 1182, in construct_yaml_str
    value = self.construct_scalar(node)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/docker_compose/dcm_parser.py", line 40, in construct_scalar
    if node.style == '|' and isinstance(node.value, ruamel.yaml.compat.text_type):
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ruamel.yaml.compat' has no attribute 'text_type'
@bakhtos
Copy link
Contributor Author

bakhtos commented Oct 21, 2024

Occurs in overture-stack/score

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant