View Full Version : quick python script error
wingnut2626
July 14th, 2013, 07:17 AM
I wrote a quick script in python to write the METAR report for my area to a file....for debug purposes I have the file executing every 5 seconds. Here is the code:import timeimport osfileIn=open('/home/wingnut2626/weather.txt', 'a')b = '-' * 30def timeAppendWeather(): a = time.time() + 5 while time.time() != a: continue else: fileIn.write(time.ctime()) fileIn.write(b) os.popen2('metar -d KILG > /home/wingnut2626/weather.txt') fileIn.write(b) fileIn.write('\n') timeAppendWeather() if __name__ == '__main__': timeAppendWeather() Here is the error that is generated:p11-kit: invalid config filename, will be ignored in the future: /etc/pkcs11/modules/gnome-keyring-moduleWARNING: gnome-keyring:: couldn't connect to: /home/wingnut2626/.cache/keyring-sKSRG2/pkcs11: No such file or directoryp11-kit: failed to initialize module: gnome-keyring-module: An error occurred on the deviceAny ideas?
sanderj
July 14th, 2013, 11:36 AM
I cannot read this. So I can't help you.
ofnuts
July 14th, 2013, 07:47 PM
Hardly readable.
Which instruction makes the message appear?
MG&TL
July 14th, 2013, 07:51 PM
I apparently have nothing I'd rather do on a Sunday evening.
I wrote a quick script in python to write the METAR report for my area to a file. For debug purposes I have the file executing every 5 seconds. Here is the code:
import time
import os
fileIn=open('/home/wingnut2626/weather.txt', 'a')
b = '-' * 30
def timeAppendWeather():
a = time.time() + 5
while time.time() != a:
continue
else:
fileIn.write(time.ctime())
fileIn.write(b)
os.popen2('metar -d KILG > /home/wingnut2626/weather.txt')
fileIn.write(b)
fileIn.write('\n')
timeAppendWeather()
if __name__ == '__main__':
timeAppendWeather()
Here is the error that is generated:
P11-kit: invalid config filename, will be ignored in the future: /etc/pkcs11/modules/gnome-keyring-module
WARNING: gnome-keyring:: couldn't connect to: /home/wingnut2626/.cache/keyring-sKSRG2/pkcs11: No such file or directory
p11-kit: failed to initialize module: gnome-keyring-module: An error occurred on the device
Any ideas?
I guessed at the python indentation, sorry. It appears to be legal python anyhow.
wingnut2626
July 15th, 2013, 04:13 AM
I figured it out. I just needed to update my debian
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.