tw-yshuang / coco2yolo

A CLI tool can create a specific task-dataset you want based on COCO dataset. Given the annotation JSON file, this tool will help you download the data and set the symbolic links from data_dir to task_dir !!
GNU General Public License v3.0
57 stars 11 forks source link

Windows 10 issues #1

Closed CeyssensHelder closed 2 years ago

CeyssensHelder commented 2 years ago

I get an error "ImportError: cannot import name 'mknod' from 'os' (C:\Program Files\Python39\lib\os.py)" Brief research tells me mknod doesn't work on Windows. Altough it's likely not the best solution, I fixed it by just deleting "mknod" from line 9 and commenting out line 62 in submodules/FileSearcher.py.

In Windows 10 you'll also need to run VS Code as Admin, maybe mention this in README?

tw-yshuang commented 2 years ago

Thank you for your mention, but I am very curious about why this "ImportError" happened? because I am set isImported=False, so basically, this error should not cause by line 62 in submodules/FileSearcher.py, did you change something by yourself, if yes, please tell me🫡

This is a CLI tool, so I think using VS Code to execute this tool is not a good option, if you are using win10 then I think you can use PowerShell to execute this tool, by typing:

./coco2yolo --help

to see more function. Hope you enjoy😁

CeyssensHelder commented 2 years ago

I didn't know about isImported=False, I just assumed that it would fail and commented everything out that uses mknod.

As I'm usually working on a project on VS Code, I used the build-in PowerShell terminal. I just tried it with the normal PowerShell and it gives the same result. So on Windows you'll likely always need to run as admin.

tw-yshuang commented 2 years ago

Thank you for your reply, I will fix it!!

Do you know how to avoid using admin to execute code by windows? I do not have the equipment that is using Windows OS. If you know how to do it, please make a pull request or leave a comment here.

tw-yshuang commented 2 years ago

I am fixed this issue. Go to check v1.0.2 !!