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

tmp permissions g_strat.export_gate_hierarchy_image() on windows 11 #244

Open
rwbaer opened this issue Mar 10, 2025 · 0 comments
Open

tmp permissions g_strat.export_gate_hierarchy_image() on windows 11 #244

rwbaer opened this issue Mar 10, 2025 · 0 comments

Comments

@rwbaer
Copy link

rwbaer commented Mar 10, 2025

This is a feature request related to a problem. Please describe.
Windows 11. Trying follow tutorial 3 and use the graphviz code to create a figure. Pretty sure graphviz is installed but the directory g_strat.export_gate_hierarchy_image() tries to write to seems to not have permissions.

# Return a gating hierarchy image from the gating strategy object
nrerated\n")
g_strat.export_gate_hierarchy_image('D/VSCode_Projects/UsingFlowkit/gs.png')
Image('D://VSCode_Projects/UsingFlowkit/gs.png')
g_strat.export_gate_hierarchy_image() 

On my windows machine it tries to write to a tmp directory that apparently doesn't have rights. Not sure why it doesn't have rights, but It would be nice if I could specify where this write was to take place to. Then, I could probably work around the issue. Here is the output:

Error: dot: can't open C:\Users\rbaer\AppData\Local\Temp\tmpt23j7q9x: Permission denied
Traceback (most recent call last):
  File "d:\VSCode_Projects\UsingFlowkit\Analysis_3.py", line 27, in <module>
    g_strat.export_gate_hierarchy_image('D/VSCode_Projects/UsingFlowkit/gs.png')
  File "C:\Users\rbaer\anaconda3\envs\flow\Lib\site-packages\flowkit\_models\gating_strategy.py", line 640, in export_gate_hierarchy_image
    DotExporter(self._gate_tree).to_picture(output_file_path)
  File "C:\Users\rbaer\anaconda3\envs\flow\Lib\site-packages\anytree\exporter\dotexporter.py", line 308, in to_picture
    check_call(cmd)
  File "C:\Users\rbaer\anaconda3\envs\flow\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dot', 'C:\\Users\\rbaer\\AppData\\Local\\Temp\\tmpt23j7q9x', '-T', 'png', '-o', 'D/VSCode_Projects/UsingFlowkit/gs.png']' returned non-zero exit status 2.

Describe the solution you'd like
Either to write to a directory that has proper permissions or a way to specify the director
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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

1 participant