-1

I try to run an python script but I get errors.

File "./ics2owncloud.py", line 41
r = requests.put('%s/%s.ics' % (base_url, uid) verify=False),
SyntaxError: invalid syntax

How must i add the verify=false in this script part?

This is the original. With this I get this error message:

SSLError: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

With this modified script only the Syntax error.

What is wrong?

gxx
  • 5,483
  • 2
  • 21
  • 42
Lars
  • 3
  • 1

1 Answers1

0

Try this:

r = requests.put('%s/%s.ics' % (base_url, uid), verify=False)
gxx
  • 5,483
  • 2
  • 21
  • 42
  • Thanks that is solved. But the next error 'File "./ics2owncloud.py", line 42 data=cal.to_ical(), ^ IndentationError: unexpected indent' – Lars Jul 19 '16 at 10:02
  • Thanks. This worked. Now I got this message '/ics2owncloud$ ./ics2owncloud.sh File "./ics2owncloud.py", line 42 data=cal.to_ical(), ^ IndentationError: unexpected indent' – Lars Jul 20 '16 at 10:06
  • Look here: ' r = requests.put('%s/%s.ics' % (base_url, uid), verify=False) data=cal.to_ical(), auth=(username, password), headers={'content-type':'text/calendar; charset=UTF-8'}' – Lars Jul 20 '16 at 10:13