tuhh-softsec / code2DFD

Tool for the automatic extraction of dataflow diagrams from source code of microservices
Other
4 stars 4 forks source link

Issues with `ruamel.yaml` #39

Open bakhtos opened 6 hours ago

bakhtos commented 6 hours ago
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 commented 6 hours ago

Occurs in overture-stack/score