Skip to content
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

Query/Parsing Issue? #22

Open
1024jon opened this issue Jul 8, 2020 · 2 comments
Open

Query/Parsing Issue? #22

1024jon opened this issue Jul 8, 2020 · 2 comments

Comments

@1024jon
Copy link

1024jon commented Jul 8, 2020

I have a bunch of pis running this that have been working great for years. I just tried setting up a new one and now it doesn't seem like its working any more. Its creating the first entry each time the gcalcron.py gets run even though its a duplicate. I am running the modified version by Mestalbet for python 3, but it had been working fine for months, but now it seems like its not, even on pis that haven't been updated.. The old pis running the python2 version are still ok I think. I can't run the python2 version on the pis anymore since its all been depreciated and removed. Any thoughts?

atq

38	Wed Jul  8 14:00:00 2020 a pi
37	Wed Jul  8 14:00:00 2020 a pi
36	Wed Jul  8 14:00:00 2020 a pi


cat gcalcron/gcalcron.log 

Setting up query: 2020-07-08T11:19:23.791570-06:00 to 2020-07-15T11:19:23.791570-06:00 modified after None
Submitting query
Query results received
[{'id': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'status': 'confirmed', 'updated': '2020-07-08T16:39:38.126Z', 'summary': 'Test', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-08T14:00:00-06:00', 'timeZone': 'America/Denver'}, 'end': {'dateTime': '2020-07-08T15:00:00-06:00', 'timeZone': 'America/Denver'}}, {'id': '4pavvn9uosk73i9ok8vf51m4kn', 'status': 'confirmed', 'updated': '2020-07-08T17:17:44.748Z', 'summary': 'test2', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-09T14:30:00-06:00'}, 'end': {'dateTime': '2020-07-09T15:30:00-06:00'}}, {'id': '2lnan2bkthuj9a1jdongv0gtb6', 'status': 'confirmed', 'updated': '2020-07-08T17:17:54.755Z', 'summary': 'Test3', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-10T12:30:00-06:00'}, 'end': {'dateTime': '2020-07-10T13:30:00-06:00'}}]
5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z-confirmed-2020-07-08T16:39:38.126Z: 2020-07-08 14:00:00 -> 2020-07-08 15:00:00 (2020-07-08T14:00:00-06:00 -> 2020-07-08T15:00:00-06:00) =>/home/pi/tvoff.sh
4pavvn9uosk73i9ok8vf51m4kn-confirmed-2020-07-08T17:17:44.748Z: 2020-07-09 14:30:00 -> 2020-07-09 15:30:00 (2020-07-09T14:30:00-06:00 -> 2020-07-09T15:30:00-06:00) =>/home/pi/tvoff.sh
2lnan2bkthuj9a1jdongv0gtb6-confirmed-2020-07-08T17:17:54.755Z: 2020-07-10 12:30:00 -> 2020-07-10 13:30:00 (2020-07-10T12:30:00-06:00 -> 2020-07-10T13:30:00-06:00) =>/home/pi/tvoff.sh
[{'uid': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 8, 14, 0)}]}, {'uid': '4pavvn9uosk73i9ok8vf51m4kn', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 9, 14, 30)}]}, {'uid': '2lnan2bkthuj9a1jdongv0gtb6', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 10, 12, 30)}]}]
['at', '14:00 Jul 08']
b''
b'warning: commands will be executed using /bin/sh\njob 36 at Wed Jul  8 14:00:00 2020\n'
Setting up query: 2020-07-08T11:19:27.928713-06:00 to 2020-07-15T11:19:27.928713-06:00 modified after None
Submitting query
Query results received
[{'id': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'status': 'confirmed', 'updated': '2020-07-08T16:39:38.126Z', 'summary': 'Test', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-08T14:00:00-06:00', 'timeZone': 'America/Denver'}, 'end': {'dateTime': '2020-07-08T15:00:00-06:00', 'timeZone': 'America/Denver'}}, {'id': '4pavvn9uosk73i9ok8vf51m4kn', 'status': 'confirmed', 'updated': '2020-07-08T17:17:44.748Z', 'summary': 'test2', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-09T14:30:00-06:00'}, 'end': {'dateTime': '2020-07-09T15:30:00-06:00'}}, {'id': '2lnan2bkthuj9a1jdongv0gtb6', 'status': 'confirmed', 'updated': '2020-07-08T17:17:54.755Z', 'summary': 'Test3', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-10T12:30:00-06:00'}, 'end': {'dateTime': '2020-07-10T13:30:00-06:00'}}]
5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z-confirmed-2020-07-08T16:39:38.126Z: 2020-07-08 14:00:00 -> 2020-07-08 15:00:00 (2020-07-08T14:00:00-06:00 -> 2020-07-08T15:00:00-06:00) =>/home/pi/tvoff.sh
4pavvn9uosk73i9ok8vf51m4kn-confirmed-2020-07-08T17:17:44.748Z: 2020-07-09 14:30:00 -> 2020-07-09 15:30:00 (2020-07-09T14:30:00-06:00 -> 2020-07-09T15:30:00-06:00) =>/home/pi/tvoff.sh
2lnan2bkthuj9a1jdongv0gtb6-confirmed-2020-07-08T17:17:54.755Z: 2020-07-10 12:30:00 -> 2020-07-10 13:30:00 (2020-07-10T12:30:00-06:00 -> 2020-07-10T13:30:00-06:00) =>/home/pi/tvoff.sh
[{'uid': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 8, 14, 0)}]}, {'uid': '4pavvn9uosk73i9ok8vf51m4kn', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 9, 14, 30)}]}, {'uid': '2lnan2bkthuj9a1jdongv0gtb6', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 10, 12, 30)}]}]
['at', '14:00 Jul 08']
b''
b'warning: commands will be executed using /bin/sh\njob 37 at Wed Jul  8 14:00:00 2020\n'
Setting up query: 2020-07-08T11:19:32.441675-06:00 to 2020-07-15T11:19:32.441675-06:00 modified after None
Submitting query
Query results received
[{'id': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'status': 'confirmed', 'updated': '2020-07-08T16:39:38.126Z', 'summary': 'Test', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-08T14:00:00-06:00', 'timeZone': 'America/Denver'}, 'end': {'dateTime': '2020-07-08T15:00:00-06:00', 'timeZone': 'America/Denver'}}, {'id': '4pavvn9uosk73i9ok8vf51m4kn', 'status': 'confirmed', 'updated': '2020-07-08T17:17:44.748Z', 'summary': 'test2', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-09T14:30:00-06:00'}, 'end': {'dateTime': '2020-07-09T15:30:00-06:00'}}, {'id': '2lnan2bkthuj9a1jdongv0gtb6', 'status': 'confirmed', 'updated': '2020-07-08T17:17:54.755Z', 'summary': 'Test3', 'description': '/home/pi/tvoff.sh', 'start': {'dateTime': '2020-07-10T12:30:00-06:00'}, 'end': {'dateTime': '2020-07-10T13:30:00-06:00'}}]
5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z-confirmed-2020-07-08T16:39:38.126Z: 2020-07-08 14:00:00 -> 2020-07-08 15:00:00 (2020-07-08T14:00:00-06:00 -> 2020-07-08T15:00:00-06:00) =>/home/pi/tvoff.sh
4pavvn9uosk73i9ok8vf51m4kn-confirmed-2020-07-08T17:17:44.748Z: 2020-07-09 14:30:00 -> 2020-07-09 15:30:00 (2020-07-09T14:30:00-06:00 -> 2020-07-09T15:30:00-06:00) =>/home/pi/tvoff.sh
2lnan2bkthuj9a1jdongv0gtb6-confirmed-2020-07-08T17:17:54.755Z: 2020-07-10 12:30:00 -> 2020-07-10 13:30:00 (2020-07-10T12:30:00-06:00 -> 2020-07-10T13:30:00-06:00) =>/home/pi/tvoff.sh
[{'uid': '5e2fnn6ge1d4dsav9692o2i0gg_20200708T200000Z', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 8, 14, 0)}]}, {'uid': '4pavvn9uosk73i9ok8vf51m4kn', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 9, 14, 30)}]}, {'uid': '2lnan2bkthuj9a1jdongv0gtb6', 'commands': [{'command': '/home/pi/tvoff.sh', 'exec_time': datetime.datetime(2020, 7, 10, 12, 30)}]}]
['at', '14:00 Jul 08']
b''
b'warning: commands will be executed using /bin/sh\njob 38 at Wed Jul  8 14:00:00 2020\n'

@fabriceb
Copy link
Owner

fabriceb commented Jul 9, 2020

Thank you for that feedback, happy it's been useful up to now.
To try to solve your problem a bit of a dichotomy:

  • it comes from badly thinking the new event has been updated
  • and not deleting the old version...
    Can you send me the python3 version?

@1024jon
Copy link
Author

1024jon commented Jul 12, 2020

Im going to be out of town for a week but then I will get that to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants