Title: TypeError: Protocols cannot be instantiated · Issue #1332 · gitpython-developers/GitPython · GitHub
Open Graph Title: TypeError: Protocols cannot be instantiated · Issue #1332 · gitpython-developers/GitPython
X Title: TypeError: Protocols cannot be instantiated · Issue #1332 · gitpython-developers/GitPython
Description: I am having a issue with getting the date from a git commit. I keep getting this error: Traceback (most recent call last): File "/code/manage.py", line 19, in
Open Graph Description: I am having a issue with getting the date from a git commit. I keep getting this error: Traceback (most recent call last): File "/code/manage.py", line 19, in
X Description: I am having a issue with getting the date from a git commit. I keep getting this error: Traceback (most recent call last): File "/code/manage.py", line 19, in <module> main() File &...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1332
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: Protocols cannot be instantiated","articleBody":"I am having a issue with getting the date from a git commit. I keep getting this error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/code/manage.py\", line 19, in \u003cmodule\u003e\r\n main()\r\n File \"/code/manage.py\", line 15, in main\r\n execute_from_command_line(sys.argv)\r\n File \"/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\r\n utility.execute()\r\n File \"/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py\", line 413, in execute\r\n self.fetch_command(subcommand).run_from_argv(self.argv)\r\n File \"/usr/local/lib/python3.9/site-packages/django/core/management/base.py\", line 354, in run_from_argv\r\n self.execute(*args, **cmd_options)\r\n File \"/usr/local/lib/python3.9/site-packages/django/core/management/base.py\", line 398, in execute\r\n output = self.handle(*args, **options)\r\n File \"/code/commits/management/commands/scan_commits.py\", line 35, in handle\r\n self.create_commits_branch(project, branch)\r\n File \"/code/commits/management/commands/scan_commits.py\", line 57, in create_commits_branch\r\n date=datetime.fromtimestamp(git_commit.committed_date),\r\n File \"/usr/local/lib/python3.9/site-packages/gitdb/util.py\", line 253, in __getattr__\r\n self._set_cache_(attr)\r\n File \"/usr/local/lib/python3.9/site-packages/git/objects/commit.py\", line 199, in _set_cache_\r\n self._deserialize(BytesIO(stream.read()))\r\n File \"/usr/local/lib/python3.9/site-packages/git/objects/commit.py\", line 528, in _deserialize\r\n self.tree = Tree(self.repo, hex_to_bin(readline().split()[1]), Tree.tree_id \u003c\u003c 12, '')\r\n File \"/usr/local/lib/python3.9/site-packages/git/objects/tree.py\", line 215, in __init__\r\n super(Tree, self).__init__(repo, binsha, mode, path)\r\n File \"/usr/local/lib/python3.9/site-packages/git/objects/base.py\", line 168, in __init__\r\n super(IndexObject, self).__init__(repo, binsha)\r\n File \"/usr/local/lib/python3.9/site-packages/git/objects/base.py\", line 56, in __init__\r\n super(Object, self).__init__()\r\n File \"/usr/local/lib/python3.9/typing.py\", line 1083, in _no_init\r\n raise TypeError('Protocols cannot be instantiated')\r\nTypeError: Protocols cannot be instantiated\r\n```\r\n\r\nI get this error with the python 3.9 in docker. Using version 3.1.20 of GitPython.","author":{"url":"https://github.com/jessielaf","@type":"Person","name":"jessielaf"},"datePublished":"2021-09-02T08:57:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1332/GitPython/issues/1332"}
| 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:845b3720-5671-6a6f-290a-5b8603ef2a26 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED80:220088:67CE:92A4:696A68F1 |
| html-safe-nonce | 34ff3b7ae36bf7861286c95853dadd6587ce3e119303bd6dbcc40c45a789662c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDgwOjIyMDA4ODo2N0NFOjkyQTQ6Njk2QTY4RjEiLCJ2aXNpdG9yX2lkIjoiMzUxNjE4Mzk4NDkwODk1Mzg0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2f3187ccc4e1ad97ce328bb5feb467780808c5078097c7bdb125755882df75a |
| hovercard-subject-tag | issue:986403921 |
| 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/gitpython-developers/GitPython/1332/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b02b4e83e97af3a11edc15c7ad5e524807e5164ba7dc795b6f18eb307a99b60/gitpython-developers/GitPython/issues/1332 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b02b4e83e97af3a11edc15c7ad5e524807e5164ba7dc795b6f18eb307a99b60/gitpython-developers/GitPython/issues/1332 |
| og:image:alt | I am having a issue with getting the date from a git commit. I keep getting this error: Traceback (most recent call last): File "/code/manage.py", line 19, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jessielaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| 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 | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width