anto-daniel / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

can't run calendar delete #536

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. delete a recurring item for only certain instances

What is the expected output? What do you see instead?
looking for delete success, instead an EventsNotFound exception.

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?
0.9.14

Please provide any additional information below 

googlecl-0.9.14$ google calendar list --query ".*" --cal "Dalton CF" --date 
2014-03-17

[Dalton CF]
CS1 (B),Mar 17 08:10 - Mar 17 08:55
CS1 (F),Mar 17 11:00 - Mar 17 11:45
CSA (I),Mar 17 11:50 - Mar 17 12:35
CSA (H),Mar 17 13:40 - Mar 17 14:25
CS1 (G),Mar 17 14:30 - Mar 17 15:15
googlecl-0.9.14$ google calendar delete --query ".*" --cal "Dalton CF" --date 
2014-03-17
For calendar Dalton CF
looking at event CS1 (B)
looking at event CS1 (F)
looking at event CSA (I)
looking at event CSA (H)
looking at event CS1 (G)
Delete "CS1 (B)"?
0) All events in this series
1) Instances on 03/17/2014
2) All events on and after 03/17/2014
3) Do not delete
1
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/google", line 5, in <module>
    pkg_resources.run_script('googlecl==0.9.14', 'google')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
    execfile(script_filename, namespace, namespace)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/EGG-INFO/scripts/google", line 991, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/EGG-INFO/scripts/google", line 977, in main
    run_once(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/EGG-INFO/scripts/google", line 763, in run_once
    task.run(client, options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/googlecl/calendar/__init__.py", line 372, in _run_delete
    None, cal.user, options.prompt)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/googlecl/calendar/service.py", line 198, in delete_recurring_events
    end_date=delete_date)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googlecl-0.9.14-py2.7.egg/googlecl/calendar/service.py", line 101, in _batch_delete_recur
    raise EventsNotFound
googlecl.calendar.service.EventsNotFound

Original issue reported on code.google.com by charlie.forster on 24 Aug 2013 at 4:02

GoogleCodeExporter commented 8 years ago
This was because of lack of escaping in the title.  solved with 
"titles=re.escape(event.title.text)," and importing re.

Original comment by charlie.forster on 24 Aug 2013 at 9:14

GoogleCodeExporter commented 8 years ago
Thanks for posting the update and bugfix!

Original comment by jh...@google.com on 26 Aug 2013 at 6:35