cotengra icon indicating copy to clipboard operation
cotengra copied to clipboard

[bug] Permission Error 13 when using quickbb-2 or quickbb-10 to find path

Open zrq1706 opened this issue 6 months ago • 0 comments

This is my code"

import cotengra as ctg

inputs = ["abc", "def", "eab", "had"]
size = 10**4
path = ctg.array_contract_path(
    inputs, shapes=[(size,) * 3] * 4, optimize="quickbb-10", cache=False
)

print(f"Inputs: {inputs}")
print(f"Path: {path}")

The error appear when writing temp file, more detailed File "C:\Users$USER\miniconda3\envs\U-stats\Lib\site-packages\cotengra\pathfinders\path_quickbb.py", line 88, in build_tree self.lg.to_cnf_file(file.name) File "C:\Users$USER\miniconda3\envs\U-stats\Lib\site-packages\cotengra\hypergraph.py", line 870, in to_cnf_file with open(fname, "w") as f: PermissionError: [Errno 13] Permission denied: 'C:\Users\dho13\temp\tmpof0kiq8p.cnf'

Addition: There also a bug when constructing line graph but is easty to fix by myself it is in init method of LineGraph class self.nodes =... require elements of Inputs is are set but they are always tuple or list

zrq1706 avatar Jun 07 '25 03:06 zrq1706