Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

In WSL2, I often cannot find where the output is. But sometimes it works. I don't know what happened. I have followed the tutorial.

in Bug reports by (2.2k points)

What do you mean with 'the output'? If you write to external files like in that tutorial, you may want to specify an absolute path if you are unsure what the current directory is.

I know where the directory is, but sometimes I can't get the output there. 'the output' means e.g. output.cdb in with open("output.cdb", "w") as file.

1 Answer

0 votes

If you know the absolute path to the file you can always use that in the open call, no? What do you mean with "I can't get the output there"? Does the open call fail or does reading from that file fail?

by (82.5k points)

When I use with open("output.cdb", "w") as file, file output.cdb should be created automatically, but sometimes it doesn't work.

That has nothing to do with cadabra, it is simply the Python logic to open a file for writing. Are you sure no exception is thrown inside that with block?

Yes, I'm sure.

...