OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect

Hi there,

We are getting this error message"

How can we get around this/resolve without losing our progress?

Many thanks!
Kate.

Hi Kate @APWF_kdr,

The issue is due to the invalid character in the path:

D:\\R2_GN_output\\Cam 8\\Indian\tMiner

More specifically, the \t between Indian and Miner. You probably wanted to type a space, but accidentally typed a tab (which generally is translated to \t in code).

If you open the recognition JSON file of the run (called image_recognition_file.json and is located in the source folder selected at step 1), and search for Indian\tMiner, what pops up?

Is it in a path, something like this:

   "file": "project_X/location_001/Indian\tMiner/img_0001.jpg",
   "detections": [
    {
     "category": "13",
     "conf": 0.974,
     "bbox": [
      0.4179,
      0.3808,
      0.5679,
      0.5224
     ]
    }
   ]
  },

Or is it in a classname, something like this:

 "detection_categories": {
  "2": "person",
  "3": "vehicle",
  "4": "family Equidae",
  "5": "Indian\tMiner",
  "6": "class Mammalia",
  "7": "class Aves",
  "8": "order Artiodactyla",
  "9": "species Meleagris gallopavo",
  "10": "species Sus scrofa",
  "11": "genus Odocoileus",
  "12": "family Bovidae",
  "1": "unidentified animal"
 },

It is probabaly a classname, which makes it easy (I hope!). Then you just have to get rid of the \t, so make it Indian Miner, save the file and try again.

If it is in a path name, then you need to adjust all the instances of Indian\tMiner in the JSON to Indian Miner, and the actual folder name to the same. Then save the file and try again.

Does that work?

Thank you!! That did the trick!

1 Like