Python Forum
can anyone help convert to python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can anyone help convert to python3
#11
I think thats a yes.
login as: pi
[email protected]'s password:
Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jul 16 08:46:17 2020 from fe80::e53c:b8f6:3a6a:da85%wlan0
pi@raspberrypi:~ $ ls -l /home/pi/tracker
total 144
-rw-r--r-- 1 root root  189 Oct 15  2019  Acknowledgements.txt
-rw-r--r-- 1 root root 1723 Oct 15  2019  audio.py
-rw-r--r-- 1 root root 1985 Jul 15 20:01  audio.pyc
-rw-r--r-- 1 root root 1024 Oct 15  2019  calibrationGraphics.py
-rw-r--r-- 1 root root 1715 Jul 15 20:01  calibrationGraphics.pyc
-rw-r--r-- 1 root root 4266 Oct 15  2019  calibration.py
-rw-r--r-- 1 root root 3869 Jul 15 20:01  calibration.pyc
-rw-r--r-- 1 root root 2809 Oct 15  2019  compass.py
-rw-r--r-- 1 root root 2704 Jul 15 20:01  compass.pyc
-rw-r--r-- 1 root root 8263 Oct 15  2019  contacts.py
-rw-r--r-- 1 root root 6086 Jul 15 20:01  contacts.pyc
-rw-r--r-- 1 root root 4402 Oct 15  2019  graphics.py
-rw-r--r-- 1 root root 3618 Jul 15 20:01  graphics.pyc
-rw-r--r-- 1 root root 4089 Oct 15  2019  main.py
-rw-r--r-- 1 root root   24 Jul 16 08:38  offsets.txt
drwxr-xr-x 2 root root 4096 Jul 15 20:31  __pycache__
-rw-r--r-- 1 root root 1542 Jul 15 20:21  pyscope.py
-rw-r--r-- 1 root root 1541 Oct 15  2019  pyscope.py.bak
-rw-r--r-- 1 root root 1562 Jul 15 20:22  pyscope.pyc
-rw-r--r-- 1 root root  110 Oct 15  2019  README.md
drwxr-xr-x 3 root root 4096 Jul 15 19:56  resources
-rw-r--r-- 1 root root 8961 Oct 15  2019  resources.py
-rw-r--r-- 1 root root 6314 Jul 15 20:01  resources.pyc
-rw-r--r-- 1 root root  477 Oct 15  2019  rotate.py
-rw-r--r-- 1 root root 5754 Oct 15  2019  startup.py
-rw-r--r-- 1 root root 3917 Jul 15 20:01  startup.pyc
-rw-r--r-- 1 root root 2650 Oct 15  2019 'tracker install.txt'
pi@raspberrypi:~ $
Reply
#12
Right, there's your problem - all the files are owned by root instead of your user pi. I suspect that it might be the same for the tracker directory - can you confirm (e.g. by running ls -l /home/pi | grep tracker)? You should change the owner and group to whatever they should be ( pi for the user and whatever group its files are usually in - check other files in the home directory to see). You can do that with chown (e.g. chown -R user:group /home/pi/tracker, but see the man page or other docs as I'm not at a Linux machine right now) and you will need to use sudo to do so.
Reply
#13
Typed ls -l /home/pi | grep tracker
pi@raspberrypi:~ $ ls -l /home/pi | grep tracker
drwxr-xr-x 3 root root 4096 Jul 16 09:09 mytracker
drwxr-xr-x 4 root root 4096 Jul 15 20:31 tracker
pi@raspberrypi:~ $
Then this and then added sudo but think i done it wrong.
pi@raspberrypi:~ $ chown -R user:group /home/pi/tracker
chown: invalid user: ‘user:group’
pi@raspberrypi:~ $ sudo chown -R user:group /home/pi/tracker
chown: invalid user: ‘user:group’
pi@raspberrypi:~ $
Reply
#14
You need to specify the actual user and group, i.e. pi and whatever the group should be (which is why I suggested you check).

Perhaps you should also read about permissions in Linux, e.g. here.
Reply
#15
Sorry but i dont understand. Yes my user name is pi, and what is the group ? I want to grant all the files in the tracker folder. so can you show an eexample if possable.
Sorry again im new to all of this.
Reply
#16
Check the other files in /home/pi to see which group is set (again just by doing ls -l in that directory). See the link in my last post as well, it covers quite a bit of useful stuff.
Reply
#17
It looks like there pi.
pi@raspberrypi:~ $ ls -l /home/pi
total 44
drwxr-xr-x 2 pi   pi   4096 May 27 08:18 Bookshelf
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Desktop
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Documents
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Downloads
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Music
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Pictures
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Public
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Templates
drwxr-xr-x 3 root root 4096 Jul 16 09:09 test
drwxr-xr-x 4 root root 4096 Jul 16 09:57 tracker
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Videos
pi@raspberrypi:~ $
Reply
#18
Yes. Now you can run chown if you haven't already.
Reply
#19
Still not right.
pi@raspberrypi:~ $ ls -l /home/pi
total 44
drwxr-xr-x 2 pi   pi   4096 May 27 08:18 Bookshelf
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Desktop
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Documents
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Downloads
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Music
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Pictures
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Public
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Templates
drwxr-xr-x 3 root root 4096 Jul 16 09:09 test
drwxr-xr-x 4 root root 4096 Jul 16 16:24 tracker
drwxr-xr-x 2 pi   pi   4096 May 27 08:47 Videos
pi@raspberrypi:~ $ cd home
-bash: cd: home: No such file or directory
pi@raspberrypi:~ $ cd /home
pi@raspberrypi:/home $ pi
-bash: pi: command not found
pi@raspberrypi:/home $ cd pi
pi@raspberrypi:~ $ dir
Bookshelf  Desktop  Documents  Downloads  Music  Pictures  Public  Templates  test  tracker  Videos
pi@raspberrypi:~ $ chown
chown: missing operand
Try 'chown --help' for more information.
pi@raspberrypi:~ $ cd /home/pi
pi@raspberrypi:~ $ dir
Bookshelf  Desktop  Documents  Downloads  Music  Pictures  Public  Templates  test  tracker  Videos
pi@raspberrypi:~ $ chown /pi
chown: missing operand after ‘/pi’
Try 'chown --help' for more information.
pi@raspberrypi:~ $
Reply
#20
I mean, the command is the same as I gave you in a previous post, just you need to set the user and group, which you now know.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  convert string into multiple columns in python3 VAN 2 2,810 Sep-26-2020, 11:14 PM
Last Post: scidam
  python3 convert hex to binary 32 bit Mkt 3 4,006 Aug-28-2020, 02:34 PM
Last Post: Mkt
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,979 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020