Project folder deleted while trying to import from arduino

Dear all,

This is my first time with PlatformIO and I’m quite upset.
I tried importing my project folder that I created using arduino IDE.

I clicked on “Import Arduino Project”.
I selected the project folder (the one that contains .ino files) and ticked the “Keep project compatible between PlatformIO and Arduino IDE” as well as the "Use Arduino IDE Library Manager"
I selected my board in the dropdown list (Arduino Nano ATmega168).

Then clicked Import.

There was an error:
PlatformIO: Failed to import an Arduino IDE project!/var/folders/z7/y2zqhdlj6fncryhs0s_mhxqm0000gn/T/pio-arduino-import116614-7032-y05zw0

And now my project folder is empty! No file, no nothing…

Is there any chance that the file have been copied somewhere?

What a great way to discover PlatformIO… now I need to do everything from scratch, it wasn’t a very big project but I did spend quite some time working on it.

I’m using a Mac on OSX El Capitan.

Do you see your source code of the project here? /var/folders/z7/y2zqhdlj6fncryhs0s_mhxqm0000gn/T/pio-arduino-import116614-7032-y05zw0 ?

Thank you, my file is there!

I tried to reproduce the issue and it is happening every time! It should be filed as a serious bug!

Thanks to God. Please sorry for this issue. We have changed “Import Arduino Project” logic a few days ago. Could you explain in details how to reproduce this issue? I have the same OS and it works for me :frowning:

I can reproduce it every time I try it, with any project done is arduino IDE, even a dummy one that contains nothing but a file with the basic “setup/loop”.
If I don’t tick the “Keep project compatible between PlatformIO and Arduino IDE” box, the project is not deleted.

I’ve just fixed it:

Could you try to replace ~/.atom/packages/platformio-ide/lib/import-arduino-project/command.js with this one?

Please restart Atom. Did it fix?

Yes!
Thank you for the support and the quick fix!

Note that the way to recover the files doesn’t work after a reboot as the files are temporary files.

PlatformIO IDE 1.3.3 has been released! Please update.

Thanks a lot that reported that and please sorry for the inconveniences.

Hi,

I am on Windows 10.

I was having similar issues, I am new to Platform IO and just installed the latest version.

It thought all my projects folder got deleted, but it turned out all the projects folders were moved to ‘src’ folder inside the ‘Sketch’ folder.
Well, not all folders, because during import it stopped because one of the folder was being opened by Arduino IDE, so the it won’t moved.

Hope it can help someone with similar issues.

Thanks.

Just had the same issue. I had a working PlatformIO folder. I wanted to turn it into compatible with Arduino IDE so I clicked on “Import Arduino project” and selected src as folder to import from. Also selected “Keep project compatible between Arduino IDE and PlatformIO”

It ended up creating another lib and src folder inside the original src folder and the rest of the files(.cpp and .h ) are not there.

Please give me a solution this is a pretty big project and it has been quite a while since last time I updated.

Thanks.

See example with manual converting of an Arduino project

The project is similar to generic PlatformIO project where source code is located in src folder. Nevertheless, here src folder has a name as main INOfile. Finally, src directory was renamed in platformio.ini.

Hi…as per my knowledge Import project only imports “eclipse projects” that means there has to be a .project file in the folder. That should not be the case with standard arduino projects. The fact it worked is strange,are there .project files on your backups?The open project works a bit different but very similar to the import.

pcb assembly offshore