1
概覽
我的目標是發展在樹莓裨運行一個Python應用程序,它通過網絡讀取OwnCloud日曆項。日曆本身是本地安裝的Owncloud的一部分,它駐留在同一本地網絡中的另一個樹莓派上。在執行請求時,通過HTTPS完成訪問,而無需進行主動SSL認證。讀owncloud使用通過CalDAV蟒日曆上樹莓裨
問題
我試圖用caldav Python包。使用PIP和Python V2.7安裝包後,我得到一個Exception: The CalDAV server you are using has a problem with path handling.
這是我鍵入PYTHON IDLE V2.7:
import caldav
cal_user='user'
cal_pass='pass'
cal_url='https://192.168.1.46/remote.php/caldav/calendars/user/pers%C3%B6nlich'
cal_client=caldav.DAVClient(cal_url, username='user', password='pass', ssl_verify_cert=False)
cal_principal=cal_client.principal()
而這正是被印在控制檯上:
Warning (from warnings module):
File "C:\PROGS\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 789
InsecureRequestWarning)
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
Warning (from warnings module):
File "C:\PROGS\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 789
InsecureRequestWarning)
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
cal_principal=cal_client.principal()
File "C:\PROGS\Python27\lib\site-packages\caldav\davclient.py", line 113, in principal
return Principal(self)
File "C:\PROGS\Python27\lib\site-packages\caldav\objects.py", line 307, in __init__
cup = self.get_properties([dav.CurrentUserPrincipal()])
File "C:\PROGS\Python27\lib\site-packages\caldav\objects.py", line 182, in get_properties
raise Exception("The CalDAV server you are using has "
Exception: The CalDAV server you are using has a problem with path handling.
我試着用URL儘可能地消除在我身邊的任何可能的輸入錯誤的發揮,但我仍然不是100%肯定,我設法把事情做對。
有人在我的情況下最終的異常消息有實際的解釋嗎?我可以在哪裏尋找解決我的問題的方法?
運行此服務器日誌時會說什麼?一個404? 403? – hnh
我在哪裏可以找到日誌? – nnako