Python path define / Python 2.7.3 -


i trying define simple python path, error. can please tell me how set correct path. working on raspberry pi.

here code doesn't work:

import re, os, rrdtool, time, sys   # define pathes 1-wire sensor data pathes = "/sys/bus/w1/devices/10-000801ddae93/w1_slave" 

and

# insert data round-robin-database rrdtool.update( "%s/temperature.rrd" % (os.path.dirname(os.path.abspath(__file__))), data) 

the errors get:

07/27/15 13:21:37 error reading s :  [errno 2] no such file or directory: 's' 07/27/15 13:21:39 error reading y :  [errno 2] no such file or directory: 'y' 07/27/15 13:21:40 error reading s :  [errno 2] no such file or directory: 's' 07/27/15 13:21:41 error reading / :  [errno 21] directory: '/' 07/27/15 13:21:42 error reading b :  [errno 2] no such file or directory: 'b' 07/27/15 13:21:44 error reading u :  [errno 2] no such file or directory: 'u' 07/27/15 13:21:45 error reading s :  [errno 2] no such file or directory: 's' 07/27/15 13:21:46 error reading / :  [errno 21] directory: '/' 07/27/15 13:21:48 error reading w :  [errno 2] no such file or directory: 'w' 07/27/15 13:21:49 error reading 1 :  [errno 2] no such file or directory: '1 

' etc.....

and

traceback (most recent call last):   file "/home/pi/python.py", line 39, in <module>     data) error: /home/pi/temperature.rrd: found data on update argument: u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u:u 

i hope u can me.

update() expects list type, or can iterate over.

try ...update([.... ])


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -