GVB icon indicating copy to clipboard operation
GVB copied to clipboard

Running error

Open lhc11171552 opened this issue 4 years ago • 9 comments

Traceback (most recent call last): File "train_image.py", line 204, in config["out_file"] = open(osp.join(config["output_path"], "log.txt"), "w") FileNotFoundError: [Errno 2] No such file or directory: 'office-home/san\log.txt'

lhc11171552 avatar Apr 27 '20 22:04 lhc11171552

Well, line 203 tries to create the directory of 'office-home/san', and line 204 tries to create and write to the file. I wonder whether you have succesfully create the directory of 'office-home/san'.

cuishuhao avatar Apr 28 '20 03:04 cuishuhao

I created this directory according to your statement, and carried out the data set migration, but the same error still occurred. Can you publish the location of the dataset,It may be caused by a problem with the directory I created。

lhc11171552 avatar Apr 28 '20 06:04 lhc11171552

The dataset could be found in "https://github.com/cuishuhao/GVB/tree/master/data/office-home". While I don't think it is the problem. The code could automaticly create the directory, without manually created. I think this is the problem to solve.

cuishuhao avatar Apr 28 '20 07:04 cuishuhao

Can I ask how you can solve it

lhc11171552 avatar Apr 28 '20 07:04 lhc11171552

I downloaded your code without modification, but still reported this error

lhc11171552 avatar Apr 28 '20 07:04 lhc11171552

  1. What environment are you using? python3? linux? 2.'office-home/san\log.txt', I think it unusual for '' and '/'
  2. I think you might have problems in 'mkdir', you might run the code with 'sudo'

cuishuhao avatar Apr 28 '20 07:04 cuishuhao

python3 under window10.I tried using sudo and still the same error

lhc11171552 avatar Apr 28 '20 08:04 lhc11171552

I ran the code in linux, and there are some differences on the file path between windows and linux. Since less codes are completed on windows, I recommend you to utilize the linux environment.

cuishuhao avatar Apr 28 '20 08:04 cuishuhao

Thank you very much

lhc11171552 avatar Apr 29 '20 07:04 lhc11171552