Skip to content

Arduino says sketch should be in subdirectory called ProffieOS, which it already is. #2268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
profezzorn opened this issue Oct 27, 2023 · 10 comments
Open
3 tasks done
Assignees
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@profezzorn
Copy link

Describe the problem

I have a file called "ProffieOS.ino". It is in a directory called "ProffieOS".
I run the arduno 2.2.1 app image and regardless of how I try to open this ino file, it complains that it needs to be in a subdirectory called "ProffieOS", then offers to move the file, which would mess up all my include paths.

It seems unlikely that this would happen to everybody all the time, but I haven't found an easy way to figure out why Arduino thinks that my ProffieOS folder isn't named ProffieOS.

I think there must be a file inside my ProffieOS directory which is confusing Arduino, because when I download a fresh copy of ProffieOS Arduino seems to open it just fine. However, if that is the case, then Arduino should just say so.

To reproduce

arduino-ide_2.2.1_LInux_64bit.AppImage ProffieOS/ProffieOS.ino

Expected behavior

Arduino should recognize that the sketch is already in a directory with the right name.

Arduino IDE version

2.2.1

Operating system

Linux

Operating system version

Ubuntu 20.05.5 LTS

Additional context

The full path name for my ProffieOS folder is /net/cytocin/home/hubbe/hack/teensy/lightsaber/ProffieOS

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@profezzorn profezzorn added the type: imperfection Perceived defect in any part of project label Oct 27, 2023
@per1234
Copy link
Contributor

per1234 commented Oct 27, 2023

Hi @profezzorn. Thanks for your report.

I note the /net/ in the path. Does the fault still occur if you move the bad copy of the sketch to a location that is not under /net/? When you downloaded the fresh copy of the sketch that did not produce the fault, was its path under /net/?

@per1234 per1234 self-assigned this Oct 27, 2023
@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Oct 27, 2023
@profezzorn
Copy link
Author

/net/ is in fact a normal directory in this case, it's not a magic NFS mount or anything.
All my files are under /net/, including the directory where I downloaded, unzipped and tested the plain copy of ProffieOS.

@profezzorn
Copy link
Author

These are the files/folders under the ProffieOS directory with the problem:

blades/
borked-color
buttons/
common/
config/
display/
doc/
elf.cc~
fontconvert/
functions/
ir/
libs/
LICENCE.txt
Makefile
motion/
mtp/
pov_tools/
pqoi/
ProffieOS.ino
props/
README.md
scripts/
show_notworking
show_working
sound/
styles/
transitions/
v6_announce.txt
v6_announce.txt~
v7.x-diff
videotoblc/
zipfiles/

None of these seems to have "meaningful" names to me.
I suppose arduino might be looking in subdirectories for something?

@profezzorn
Copy link
Author

profezzorn commented Oct 27, 2023

The problem seems to be a file called ProffieOS/blades/.#pwm_pin.h
When I remove that file, Arduino is able to open the sketch.
This file is created by emacs while editing a file, and can sometimes be left behind.
Not sure why Arduino thinks that "ProffieOS" isn't called "ProffieOS" because it contains a .# file though...

@per1234 per1234 added topic: code Related to content of the project itself and removed status: waiting for information More information must be provided before work can proceed labels Nov 23, 2023
@VeloSteve

This comment was marked as off-topic.

@per1234

This comment was marked as off-topic.

@profezzorn

This comment was marked as resolved.

@profezzorn

This comment was marked as resolved.

@econeale
Copy link

econeale commented Jan 8, 2024

I have a similar problem with IDE 2.2.1 on Windows. In my case, I had to remove a sub-folder containing test sketches. It looks like the IDE is trying to recursively open sketches and complains if it finds extra INO files. Have you looked at your scripts directory for such things?

It also seems to fail when there's a simlink in the directory. Note that neither of these issues arise when using the CLI.

@andreh7
Copy link

andreh7 commented Jul 21, 2024

FWIW, On MacOS I see a similar problem when I had invalid softlinks in the project directory (the IDE 2.3.2 wanted to move proj/proj.ino to proj/proj/proj.ino.

To reproduce I can do:

ln -s a b

in proj/ and open proj/proj.ino with the Arduino IDE.

/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-cli" upload proj.ino

showed an error message like:

b: no such file or directory

so I guess some part of the code scans the directory and fails when a softlink points to 'nowwhere' and leads to a confusing error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

5 participants