Skip to content

[Bug] PDF and PNG generation fails #556

@smartie2076

Description

@smartie2076

Since I set up the environment from scratch after the latest release - using pip install -e . but also using the troubleshooting for pygraphviz I can not create the pdf report (-pdf), nor the pngs (-png). It fails with the png generation of the energy system graph:

Format: "png" not recognized. Use one of:
Traceback (most recent call last):
  File "mvs_tool.py", line 4, in <module>
    main()
  File "d:\pycharmprojects\mvs_eland\src\mvs_eland\cli.py", line 138, in main
    dict_values, save_energy_system_graph=save_energy_system_graph
  File "d:\pycharmprojects\mvs_eland\src\mvs_eland\D0_modelling_and_optimization.py", line 89, in run_oemof
    dict_values, model, save_energy_system_graph=save_energy_system_graph
  File "d:\pycharmprojects\mvs_eland\src\mvs_eland\D0_modelling_and_optimization.py", line 239, in plot_networkx_graph
    graph.render()
  File "d:\pycharmprojects\mvs_eland\src\mvs_eland\F1_plotting.py", line 412, in render
    self.dot.render(**kwargs)
  File "D:\PycharmProjects\mvs_eland\win_venv\lib\site-packages\graphviz\files.py", line 209, in render
    quiet=quiet)
  File "D:\PycharmProjects\mvs_eland\win_venv\lib\site-packages\graphviz\backend.py", line 221, in render
    run(cmd, capture_output=True, cwd=cwd, check=True, quiet=quiet)
  File "D:\PycharmProjects\mvs_eland\win_venv\lib\site-packages\graphviz\backend.py", line 184, in run
    output=out, stderr=err)
graphviz.backend.CalledProcessError: Command '['dot', '-Tpng', '-O', 'energy_system_graph']' returned non-zero exit status 1. [stderr: b'Format: "png" not recognized. Use one of
:\r\n']

@Bachibouzouk, do you know how I can fix this?

Checklist to make sure that the bug report ist complete:

  • OS: WIN10, pycharm
  • Branch: dev merged into Fix/excess #555, updated on 2020-09-03
  • If applicable: Attach full error message
  • ❌ If applicable: Share screenshots/images of your problem
  • ❌ If applicable: Share used input data

Todos

  • Add dot -c to troubleshooting.rst below pygraphviz for its setup
  • Fix timeout error of -pdf option

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions