OrderedSet86 / gtnh-flow

Factory Optimization Flowcharts for Gregtech: New Horizons
MIT License
84 stars 24 forks source link

Error generating graph #24

Closed trainvoi closed 6 months ago

trainvoi commented 6 months ago

Log:

INFO:root:Fixing factory cycle by redirecting "Toluene" to sink
INFO:root:Fixing factory cycle by redirecting "Hot Sulfuric Acid" to sink
INFO:root:Running linear solver...
INFO:root:Solving multi-output scenario involving flour!
{(133.333333333333, 0.15, 0.15, 0.0166666666666667, 8.33333333333333, 8.33333333333333, 0.133333333333333, 0.133333333333333, 66.6666666666667, 133.333333333333, 0.133333333333333, 33.3333333333333, 0.133333333333333, 8.33333333333333, 133.333333333333, 133.333333333333, 0.0666666666666667, 1.33333333333333, 46.6666666666667, 46.6666666666667, 0.666666666666667, 47.3333333333333, 47.3333333333333, 0.666666666666667, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 21.0, 21.0, 21.0, 0.0166666666666667, 0.133333333333333)}
INFO:root:Detected burnable: Ethylene! Adding to chart.
INFO:root:Added lv generator burning 41.99999999999999 ethylene for 247.62EU/t at 32EU/t each.
Error: bio-ethanol: syntax error in line 27 near '>'
Traceback (most recent call last):
kend\execute.py", line 88, in run_check
    proc.check_returncode()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 502, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '[WindowsPath('dot'), '-Kdot', '-Tpng', '-O', 'bio-ethanol']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\PV\Documents\gtnh-flow\factory_graph.py", line 58, in generate_one
    self.graph_gen(self, project_name[:-5], recipes, self.graph_config)
  File "C:\Users\PV\Documents\gtnh-flow\src\graph\_solver.py", line 623, in systemOfEquationsSolverGraphGen
    outputGraphviz(g)
  File "C:\Users\PV\Documents\gtnh-flow\src\graph\_output.py", line 258, in outputGraphviz
    g.render(
  File "C:\Users\PV\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\graphviz\_tools.py", line 171, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PV\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\graphviz\rendering.py", line 122, in render
    rendered = self._render(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PV\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\graphviz\_tools.py", line 171, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PV\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\graphviz\backend\rendering.py", line 326, in render
    execute.run_check(cmd,
  File "C:\Users\PV\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\graphviz\backend\execute.py", line 90, in run_check
    raise CalledProcessError(*e.args)
graphviz.backend.execute.CalledProcessError: Command '[WindowsPath('dot'), '-Kdot', '-Tpng', '-O', 'bio-ethanol']' returned non-zero exit status 1. [stderr: b"Error: bio-ethanol: syntax error in line 27 near '>'\r\n"]

ERROR:root:Error generating graph for project "susy/bio-ethanol.yaml": Command '[WindowsPath('dot'), '-Kdot', '-Tpng', '-O', 'bio-ethanol']' returned non-zero exit status 1. [stderr: b"Error: bio-ethanol: syntax error in line 27 near '>'\r\n"]
ERROR:root:If error cause is not obvious, please notify dev: https://github.com/OrderedSet86/gtnh-flow/issues
Please enter project path (example: "power/oil/light_fuel.yaml", tab autocomplete allowed)

Code:

- m: macerator
  tier: LV
  I:
    wheat: 1
  O:
    flour: 1
  eut: 2
  dur: 4.9  
  #target:
     #coke dust: 12
  group: impure ethanol preq
- m: mixer
  tier: LV
  I:
    flour: 2
    water: 1000
  O:
    grain solution: 1000
  eut: 30
  dur: 5
  group: impure ethanol preq
- m: autoclave
  tier: LV
  I:
    flour: 2
    malted grain: 2
    water: 1000
  O:
    mash: 2000
  eut: 30
  dur: 5
  group: impure ethanol preq
- m: autoclave
  tier: LV
  I:
    seed: 4
    water: 1000
  O:
    malted grain: 4
  eut: 30
  dur: 10
  group: impure ethanol preq
- m: fermentation vat
  tier: LV
  I:
    mash: 16000
    grain solution: 1000
  O:
    impure ethanol: 16000
  eut: 16
  dur: 120
  group: impure ethanol preq
  number: 1
- m: distillation tower
  tier: LV
  I:
    impure ethanol: 2000
  O:
    wood pulp: 1
    fusel oil: 20
    #water: 1280
    ethanol-water azeotrope: 700
  eut: 30
  dur: 2.5
  group: impure ethanol processing
#- m: distillation tower
#  tier: LV
#  I:
#    fusel oil: 1000
#  O:
#    isoamyl alcohol: 615
#    n-butanol: 10
#    isobutyl alcohol: 155
#    #water: 110
#    n-propanol: 10
#    ethanol-water azeotrope: 100
#  eut: 30
#  dur: 2.5
#  group: impure ethanol processing
- m: mixer
  tier: LV
  I:
    ethanol-water azeotrope: 700
    toluene: 10
  O:
    entrained ethanol-water azeotrope: 710
  eut: 30
  dur: 2.5
  group: impure ethanol processing
- m: distillation tower
  tier: LV
  I:
    entrained ethanol-water azeotrope: 710
  O:
    toluene: 10
    #water: 70
    ethanol: 630
  eut: 30
  dur: 2.5
  group: impure ethanol processing
- m: CSTR
  tier: LV
  I:
    ethanol: 100
    hot sulfuric acid: 100
  O:
    ethylene: 100
    diluted sulfuric acid: 100
  eut: 30
  dur: 0.25
  group: ethanol -> ethylene
- m: distillery
  tier: LV
  I:
    diluted sulfuric acid: 50
  O:
    sulfuric acid: 25
  eut: 7
  dur: 0.5
  group: ethanol -> ethylene
- m: fluid heater
  tier: LV
  I:
    sulfuric acid: 1000
  O:
    hot sulfuric acid: 1000
  eut: 7
  dur: 2.5
  group: ethanol -> ethylene
trainvoi commented 6 months ago

seems like removing the '>' in 'group: ethanol -> ethylene' works

OrderedSet86 commented 6 months ago

> has a special meaning in YAML: image

The error message tells you the exact line number of the issue so no code changes are needed