Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

Fix import command on Windows#11

Open
jakewarrenblack wants to merge 1 commit intoroboflow:masterfrom
jakewarrenblack:master
Open

Fix import command on Windows#11
jakewarrenblack wants to merge 1 commit intoroboflow:masterfrom
jakewarrenblack:master

Conversation

@jakewarrenblack
Copy link
Copy Markdown

@jakewarrenblack jakewarrenblack commented Mar 23, 2023

Import command (e.g. roboflow import C:\Users\Jake\Downloads\Aerial_Maritime.v24i.yolov8 -p test-zixpe would not work on windows, and just failed silently.

Replace forward slashes in globPattern with backslashes, needs to be in POSIX format. See https://stackoverflow.com/questions/55512907/node-glob-sync-returns-empty-array

It seems to me like this only works for PASCAL VOC format. I tried uploading YOLOv8 PyTorch TXT annotations, which didn't work, and just resulted in annotations covering the entire image. PASCAL VOC seems to work.

Description

Please include a summary of the change and which issue is fixed or implemented. Please also include relevant motivation and context (e.g. links, docs, tickets etc.).

Uncommented await Promise.all(uploadPromises); in upload.js

Replace forward slashes with backslashes to match format expected by glob.sync

Type of change

  • [✔ ] Bug fix (non-breaking change which fixes an issue)

…path with backslashes for globPattern, uncomment await for uploadPromises
@yeldarby yeldarby requested a review from hansent May 25, 2023 14:30
const globPattern = path.join(dirName, "**/*");

return glob.sync(globPattern);
return glob.sync(globPattern.replace(/\\/g, '/'));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this probably needs a check to only do this on windows?

Copy link
Copy Markdown
Contributor

@hansent hansent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

I think in order to include this we need two changes:

  • only replace the slashes in the pattern on windows
  • add some unit tests the functionality

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants