Title: Alwasy get urllib2.HTTPError: HTTP Error 403: Forbidden · Issue #35 · ox-it/python-sharepoint · GitHub
Open Graph Title: Alwasy get urllib2.HTTPError: HTTP Error 403: Forbidden · Issue #35 · ox-it/python-sharepoint
X Title: Alwasy get urllib2.HTTPError: HTTP Error 403: Forbidden · Issue #35 · ox-it/python-sharepoint
Description: Hi. This is how I use the code. And I always get the 403 error. In the web browser, I always use the email account to login. I don't know the username here is the Email address I used to login the www.office.com website? The username I u...
Open Graph Description: Hi. This is how I use the code. And I always get the 403 error. In the web browser, I always use the email account to login. I don't know the username here is the Email address I used to login the ...
X Description: Hi. This is how I use the code. And I always get the 403 error. In the web browser, I always use the email account to login. I don't know the username here is the Email address I used to login ...
Opengraph URL: https://github.com/ox-it/python-sharepoint/issues/35
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Alwasy get urllib2.HTTPError: HTTP Error 403: Forbidden","articleBody":"Hi. This is how I use the code. And I always get the 403 error. In the web browser, I always use the email account to login. I don't know the username here is the Email address I used to login the www.office.com website? The username I used is ``xxx@pku.edu.cn``. Is this right? Or I should use some translated names like ``pku_edu_cn\\\\xxx``?\r\n\r\n\r\n```python\r\nfrom sharepoint import SharePointSite, basic_auth_opener\r\n\r\nserver_url = \"https://pkueducn-my.sharepoint.com/\"\r\nsite_url = server_url + \"personal/xxx_pku_edu_cn\"\r\n\r\nopener = basic_auth_opener(server_url, \"xxx@pku.edu.cn\", \"my_password\")\r\n\r\nsite = SharePointSite(site_url, opener)\r\n\r\nfor sp_list in site.lists:\r\n print sp_list.id, sp_list.meta['Title']\r\n```\r\n\r\nMy error:\r\n```\r\nC:\\Python27\\python.exe J:/github_repos/xxx/sp.py\r\nTraceback (most recent call last):\r\n File \"J:/github_repos/xxx/sp.py\", line 17, in \u003cmodule>\r\n for sp_list in site.lists:\r\n File \"C:\\Python27\\lib\\site-packages\\sharepoint\\lists\\__init__.py\", line 80, in __iter__\r\n return iter(self.all_lists)\r\n File \"C:\\Python27\\lib\\site-packages\\sharepoint\\lists\\__init__.py\", line 36, in all_lists\r\n result = self.opener.post_soap(LIST_WEBSERVICE, xml)\r\n File \"C:\\Python27\\lib\\site-packages\\sharepoint\\site.py\", line 32, in post_soap\r\n response = self.opener.open(request, timeout=self.timeout)\r\n File \"C:\\Python27\\lib\\urllib2.py\", line 435, in open\r\n response = meth(req, response)\r\n File \"C:\\Python27\\lib\\urllib2.py\", line 548, in http_response\r\n 'http', request, response, code, msg, hdrs)\r\n File \"C:\\Python27\\lib\\urllib2.py\", line 473, in error\r\n return self._call_chain(*args)\r\n File \"C:\\Python27\\lib\\urllib2.py\", line 407, in _call_chain\r\n result = func(*args)\r\n File \"C:\\Python27\\lib\\urllib2.py\", line 556, in http_error_default\r\n raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)\r\nurllib2.HTTPError: HTTP Error 403: Forbidden\r\n\r\nProcess finished with exit code 1\r\n\r\n```","author":{"url":"https://github.com/hsluoyz","@type":"Person","name":"hsluoyz"},"datePublished":"2018-01-24T13:20:46Z","url":"https://github.com/ox-it/python-sharepoint/issues/35"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48464078-a49b-f4a0-cf62-197e3ef22c8c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C66:2A6CBA:273BF:33669:6B093463 |
| html-safe-nonce | 2ba5b768288a5ae71effd5370526cbbe424e8d8cc2534b578ea0024af4e30af6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzY2OjJBNkNCQToyNzNCRjozMzY2OTo2QjA5MzQ2MyIsInZpc2l0b3JfaWQiOiI3NDM3ODQ3NjU3MTY5MTA2MDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5ba8cf884908a676b69fd51f2c8fb61828e18c85809ecaf9e98a8f9b27b01ead |
| hovercard-subject-tag | issue:291206106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ox-it/python-sharepoint/35/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0934dda0b06f99fbd2592a0389a5a9a0aad8855210318f12afb2b3aae447ebe5/ox-it/python-sharepoint/issues/35 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0934dda0b06f99fbd2592a0389a5a9a0aad8855210318f12afb2b3aae447ebe5/ox-it/python-sharepoint/issues/35 |
| og:image:alt | Hi. This is how I use the code. And I always get the 403 error. In the web browser, I always use the email account to login. I don't know the username here is the Email address I used to login the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hsluoyz |
| hostname | github.com |
| expected-hostname | github.com |
| None | da7e7304a38b6bc6a1ec0a7970f219ae1c71491302599b3c42088762d8889d94 |
| turbo-cache-control | no-preview |
| go-import | github.com/ox-it/python-sharepoint git https://github.com/ox-it/python-sharepoint.git |
| octolytics-dimension-user_id | 351950 |
| octolytics-dimension-user_login | ox-it |
| octolytics-dimension-repository_id | 6655089 |
| octolytics-dimension-repository_nwo | ox-it/python-sharepoint |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 6655089 |
| octolytics-dimension-repository_network_root_nwo | ox-it/python-sharepoint |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3cb927d1757a02e619a0eb62b036233d6d9cdc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width