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

An error occurred while creating the graph; GraphViz returned: Error: <stdin>: syntax error in line 195 near '.' #74

Open
cirolosapio opened this issue Apr 4, 2020 · 3 comments

Comments

@cirolosapio
Copy link

Found 51 models.
Inspecting model relations.
 51/51 [============================] 100% < 1 sec/< 1 sec 46.0 MiB
   phpDocumentor\GraphViz\Exception

  An error occurred while creating the graph; GraphViz returned: Error: <stdin>: syntax error in line 195 near '.'

  at C:\laragon\www\as-server\vendor\phpdocumentor\graphviz\src\phpDocumentor\GraphViz\Graph.php:375
    371|         exec($this->path . "dot -T$type -o$filename < $tmpfileArg 2>&1", $output, $code);
    372|         unlink($tmpfile);
    373|
    374|         if ($code != 0) {
  > 375|             throw new Exception(
    376|                 'An error occurred while creating the graph; GraphViz returned: '
    377|                 . implode(PHP_EOL, $output)
    378|             );
    379|         }

  1   C:\laragon\www\as-server\vendor\beyondcode\laravel-er-diagram-generator\src\GenerateDiagramCommand.php:80
      phpDocumentor\GraphViz\Graph::export(""png"", ""graph.png"")

  2   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32
      BeyondCode\ErdGenerator\GenerateDiagramCommand::handle()

  3   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32
      call_user_func_array([])

  4   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\Util.php:36
      Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

  5   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:90
      Illuminate\Container\Util::unwrapIfClosure(Object(Closure))

  6   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:34
      Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))

  7   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Container\Container.php:592
      Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])

  8   C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Console\Command.php:134
      Illuminate\Container\Container::call()

  9   C:\laragon\www\as-server\vendor\symfony\console\Command\Command.php:255
      Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

  10  C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Console\Command.php:121
      Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

  11  C:\laragon\www\as-server\vendor\symfony\console\Application.php:912
      Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  12  C:\laragon\www\as-server\vendor\symfony\console\Application.php:264
      Symfony\Component\Console\Application::doRunCommand(Object(BeyondCode\ErdGenerator\GenerateDiagramCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  13  C:\laragon\www\as-server\vendor\symfony\console\Application.php:140
      Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  14  C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Console\Application.php:93
      Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  15  C:\laragon\www\as-server\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:129
      Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  16  C:\laragon\www\as-server\artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
@HDVinnie
Copy link

same thing

Found 68 models.
Inspecting model relations.
 68/68 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
   phpDocumentor\GraphViz\Exception  : An error occurred while creating the graph; GraphViz returned: Error: <stdin>: syntax error in line 615 near '.'

  at /home/vagrant/Personal/UNIT3D_PUBLIC/vendor/phpdocumentor/graphviz/src/phpDocumentor/GraphViz/Graph.php:375
    371|         exec($this->path . "dot -T$type -o$filename < $tmpfileArg 2>&1", $output, $code);
    372|         unlink($tmpfile);
    373| 
    374|         if ($code != 0) {
  > 375|             throw new Exception(
    376|                 'An error occurred while creating the graph; GraphViz returned: '
    377|                 . implode(PHP_EOL, $output)
    378|             );
    379|         }

  Exception trace:

  1   phpDocumentor\GraphViz\Graph::export()
      /home/vagrant/Personal/UNIT3D_PUBLIC/vendor/beyondcode/laravel-er-diagram-generator/src/GenerateDiagramCommand.php:80

  2   BeyondCode\ErdGenerator\GenerateDiagramCommand::handle()
      /home/vagrant/Personal/UNIT3D_PUBLIC/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

@cirolosapio
Copy link
Author

cirolosapio commented Apr 23, 2020

@HDVinnie are u on sqlsrv?
If yes, your tables has schema?
Example schema.tables

@jandermannderkann
Copy link

I just had the same Issue. For me the Problem occured, because the $tablename attribute of a model was set to "something.something".
I might create a PR for this.

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

3 participants