Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

[68] Invalid command line generated when extra parameters specified #9

Open
prmtl opened this issue Mar 8, 2015 · 2 comments
Open

Comments

@prmtl
Copy link
Contributor

prmtl commented Mar 8, 2015

Reported by [email protected], 2012-03-08T19:21:04Z

What steps will reproduce the problem?
  1. Generate any graph structure
  2. Call the write function with a list as the parameter, using more than one value in the list. For example :
    graph.write_svg(somefile, prog=['twopi', 'overlap=scale'])

Expected : The graph is generated using the extra settings specified
Actual : The library raises an error saying that the command line was invalid (with the example above : "InvocationException: Program terminated with status: 2. stderr follows: Error: twopi: can't open overlap=scale")

Pydot-1.0.28-py2.7, on windows 7 x64

I think the bogus line is line 1985 :
cmdline = [self.progs[prog], '-T'+format, tmp_name] + args

The error is that the args list is appended at the end of the command list, while they should be placed between the -T and input elements (the rule being that the input files must be placed at the end of the command)
Originally assigned to [email protected]
From: https://code.google.com/p/pydot/issues/detail?id=68

@prmtl
Copy link
Contributor Author

prmtl commented Mar 8, 2015

Comment by [email protected], 2012-03-27T03:53:30Z

Also the write_ function does not honour the program set using set_prog.

@prmtl
Copy link
Contributor Author

prmtl commented Mar 8, 2015

Comment by [email protected], 2012-06-26T15:02:11Z

The correct form of attributes passed through the command line is, according to the manual pages:

-(G|N|E)name=value

Hence, the following line works:

graph.write_svg(somefile, prog=['twopi', '-Goverlap=scale'])

The issue in the comment is valid and will be fixed.
Assigned to [email protected]

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

No branches or pull requests

1 participant