[SOLVED] [Errno 13] Permission denied: ‘/home/pi/Dexter/black_line.txt’

#1

With this code

import easygopigo3 as easy
import easysensors
import time
gpg = easy.EasyGoPiGo3()

try:
my_linefollower = gpg.init_line_follower()
time.sleep(0.1)
except:
print(‘Line Follower not responding’)
time.sleep(0.2)
exit()

I’m getting these errors below

Line Follower: failed getting black line values!
[Errno 13] Permission denied: ‘/home/pi/Dexter/black_line.txt’

Installed the latest OS (dexteros2.2.2.img) from here (https://www.dexterindustries.com/dexteros/get-dexteros-operating-system-for-raspberry-pi-robotics/)

return value is ‘black’ for
my_linefollower.read_position()

return value is ‘bbbbb’ for
my_linefollower.read_position_str()

Some investigations…

from terminal

cd /home
ls -a
drwxr-xr-x 15 jupyter jupyter 4096 Aug 11 13:02 jupyter
drwxr----- 14 pi pi 4096 Aug 11 13:02 pi

ls pi/Dexter/black_line.txt
ls: cannot access ‘pi/Dexter/black_line.txt’: Permission denied

Any suggestions?

GoPiGo Line follower - Help
Release notes for DexterOS 2.2.2
#2

What version of DexterOS are you using?

#3

Using 2.2.2 downloaded from Dexter site. Full path listed.

#4

cleoqc,

I helped ang change the file system permissions on /home/pi/Dexter/black_line.txt and /home/pi/Dexter/white_line.txt which fixed this issue but left robot security in a possibly less desirable state.

It looks like in order to use the line follower python libraries in a Jupyter notebook, those two files need to be accessible to the Jupyter user. Do you have a better solution?

#5

Hmm, that was supposed to be fixed. It somehow reared its head again :frowning:

Thanks, @mashcraf1 for jumping in.
I’m going to have to investigate. Thanks for the heads up!

#6

cleoqc,

We are building a new OS image today. If you have the recommended fix for this, please provide.

Thanks,
Mike

#7

We are in the midst of getting 2.2.3 out which will have the fix, but not for a few more hours. Honestly, probably not available before tomorrow, as we want to run tests on it before release.

Cleo

#8

@cleoqc,

We rebuilt our DexterOS 2.2.2 image with the following changes.

chmod 666 /home/pi/Dexter/*line.txt
chmod +x /home/pi /home/pi/Dexter

This passed some quick testing. Hope that helps.

#9

Know something? I can’t even reproduce the bug.
I’ve just downloaded the image from the net, not trusting my local version anymore. I’m about to try this one and see if it still has the bug.
(and yes, what you’re doing is pretty much the fix I will be officially doing)

#10

Ok I have it duplicated now. At least I’m not going crazy, this was indeed fixed in 2.2, and came back in 2.2.2

Off to do an official fix now

1 Like
#11

Hello

I have the same issue
When this fix will be available ? Also is there a way to connect a terminal using pi user on a dexteros.
I tried terminal with jupiter@gopigo. Any sudo command ask a password and robots1234 is not working

#12

The patch is available upon request. I am sending you a private message.

Anyone else who needs the patch, contact me.

ETA: you must be running DexterOS 2.2.2 for the patch to work

Cleo

#13

Hi, Can you tell me where I get the patch from. I found the DexterOS2.2.3 on gitfub, but this is a zip and I can only find instructions to create a sd card with an image file.

#14

This is where I downloaded the zip from. I am unsure of how to combine it with my DexterOS 2.2.2 install

#15

Hello @richard.drake
This would not be the proper file. I’ve sent you the info in a private message.

Cleo