I'm trying to plot an HMM model, implemented through the usage of the Pomegranate library.
Calling the plot method with model.plot()
invokes the following error:
PermissionError Traceback (most recent call last)
<ipython-input-29-405034733d4b> in <module>
3 #unique_data = [list(x) for x in set(tuple(x) for x in result)]
4 #unique_data
----> 5 model.plot()
D:\ProgramData\Anaconda3\lib\site-packages\pomegranate\hmm.pyx in pomegranate.hmm.HiddenMarkovModel.plot()
D:\ProgramData\Anaconda3\lib\site-packages\pomegranate\hmm.pyx in pomegranate.hmm.HiddenMarkovModel.plot()
D:\ProgramData\Anaconda3\lib\site-packages\pygraphviz\agraph.py in draw(self, path, format, prog, args)
1516
1517 if path is not None:
-> 1518 fh = self._get_fh(path, 'w+b')
1519 fh.write(data)
1520 if is_string_like(path):
D:\ProgramData\Anaconda3\lib\site-packages\pygraphviz\agraph.py in _get_fh(self, path, mode)
1545 fh = os.popen("bzcat " + path) # probably not portable
1546 else:
-> 1547 fh = open(path, mode=mode)
1548 elif hasattr(path, 'write'):
1549 # Note, mode of file handle is unchanged.
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\renda\\AppData\\Local\\Temp\\tmp672ou8lg'
I tried to change the R/W permission on the folder, but it didn't work. Any suggestion? I'm working on Windows 10, using Anaconda3 environment.