Code Monkey home page Code Monkey logo

Comments (21)

hao-lee avatar hao-lee commented on June 12, 2024 6

@AndrewMagerman @kwoodham
Hi, This is indeed a problem. Sublime Text doesn't provide an api to watch syntax changing, so the image rendering can't be triggered by setting syntax to Graphviz (Dot). For now, the only way to trigger the rendering process is editing the content.
I have planned to fix this problem using some tricks, it will be released in next release. 😏

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024 1

@AndrewMagerman Hi, check the latest release. 😏 It's perfect!

from graphvizer.

kwoodham avatar kwoodham commented on June 12, 2024

Same issue for me on Windows 10 - I do not see a graphvizer.png generated in the system temp folder, and the "Loading image..." displays in Sublime Text. I'm confirmed that dot is in the Windows path.

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

@AndrewMagerman
Hi,
It seems that you didn't set the syntax to Graphviz (Dot). You can do this by View -> Syntax menu or clicking the bottom right corner of Sublime Text window.

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

@kwoodham
Hi,
You can press Ctrl + ~ to open the sublime console. If these are some errors, you can post them here to help me debug plugin. Thanks!

from graphvizer.

AndrewMagerman avatar AndrewMagerman commented on June 12, 2024

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

If the graphviztemp directory does exist, I think it may because this directory doesn't have permission to write.

from graphvizer.

AndrewMagerman avatar AndrewMagerman commented on June 12, 2024

from graphvizer.

kwoodham avatar kwoodham commented on June 12, 2024

Andrew's experience is the same as mine: the plugin is working fine now - I found that I needed to make an edit to the dot file before the image was rendered (something as simple as deleting a ";" and restoring it) - So it appears that the dot command is kicked off by a modification to the dot.

This isn't a problem for me now that I understand the solution. Thank you for your excellent work, hao-lee!

Kurt

from graphvizer.

AndrewMagerman avatar AndrewMagerman commented on June 12, 2024

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

@AndrewMagerman
Hi AndrewMagerman, thanks for your suggestion. This is indeed useful and will be enhanced in the next release.

from graphvizer.

AndrewMagerman avatar AndrewMagerman commented on June 12, 2024

from graphvizer.

Gerst20051 avatar Gerst20051 commented on June 12, 2024

I'm still seeing this issue of needing to edit the contents for the image to appear.

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

@Gerst20051 Try to update the plugin to the latest version

from graphvizer.

Gerst20051 avatar Gerst20051 commented on June 12, 2024

@hao-lee I had just installed it for the first time today.

from graphvizer.

Gerst20051 avatar Gerst20051 commented on June 12, 2024

Let me know if theres any more details I can provide.

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

I'm still seeing this issue of needing to edit the contents for the image to appear.

@Gerst20051
Hi, you can describe the steps that can reproduce this issue. If the image is not rendered, you can also see if there are some errors in Graphvizer Panel (Ctrl+Shift+x to open it) or Sublime console (Ctrl+~ to open it). Thanks.

from graphvizer.

cpenny42 avatar cpenny42 commented on June 12, 2024

I am having this exact same issue.

Here is my dot file:

digraph test {
	foo -> bar
	foo -> baz
	bar -> baz
}

And my settings:

{
	// "dot_cmd_path" is the path of dot command. Here are some examples.
	// For Windows: "D:\\Graphviz\\bin\\dot.exe"
	// For Linux: "/usr/bin/dot"
	// For OSX: "/usr/bin/dot"
	// If you have added this path to the PATH environment variable, you can
	// use "dot" instead of the full absolute path.
	"dot_cmd_path": "dot",
	// If the dot command takes more than `dot_timeout` seconds, it will be
	// terminated. The default value is 3 seconds.
	"dot_timeout": 3,
	// "show_image_with" controls how to show the image.
	// The default value is "layout", so the image will be shown in a separated
	// layout by default. If you want to show it in a new window instead,
	// change the following value to "window". If you just want to show the image
	// in a new tab, change the value to "tab".
	"show_image_with": "layout",
	// "image_dir" controls where the image is saved. If the value is "",
	// system temporary directory is used. You can set it to other directory.
	// Example for Windows: "E:\\homework\\image\\"
	// Example for Linux/OSX: "/home/haolee/image/"
	"image_dir": "/Users/chrispenny/Developer/temp",
	// The default behavior is rendering the image in real time.
	// If set to false, the image will only be rendered when the file is saved.
	"render_in_realtime": true
}

Note that I have correctly installed graphviz and can run dot -v in the terminal (and can successfully render my test file). I installed the sublime text package today, so I imagine it is at the latest version.

When I open the console, I see this error message only the first time it tries to process a file:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/chrispenny/Library/Application Support/Sublime Text 3/Installed Packages/Graphvizer.sublime-package/graphvizer.py", line 67, in dot_thread
    with open(file=self.dot_file, mode="w", encoding="utf-8") as fd:
TypeError: invalid file: None

I can imagine that the python script getting None as the file would be an issue!

Subsequent times I try closing and opening the graphvizer window (ctrl-shift-g) I see this in the console: decode image failed

However, when I open the graphvizer panel, I see this message: [2019-04-30 12:47:47] - No error occurred

I have tried leaving my image_dir blank as well as trying all sorts of different directories (based on the advice above), but no luck.

Here is a screenshot:
Graphvizer Error Screenshot

Hope this helps!

from graphvizer.

cpenny42 avatar cpenny42 commented on June 12, 2024

Forgot to mention I am on macOS 10.14 (Mojave)

from graphvizer.

panchtox avatar panchtox commented on June 12, 2024

Same issue on Mojave 10.14.5
Thanks

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

@panchtox
Hi, you can try to update to the latest version. If the problem still exists, press `CMD+`` and see if there are some errors in there. Thanks.

from graphvizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.