Server error when accessing file as directory
- Dominant language
- Python
- Stars
- 435
- Forks
- 124
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 14
Description
```
Internal Server Error: /course/CS101/f/pdfs/Lecture5.pdf/404
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 43, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "/usr/lib/python2.7/dist-packages/django/views/decorators/http.py", line 158, in inner
response = func(request, *args, **kwargs)
File "./course/views.py", line 222, in get_current_repo_file
request, course, role, participation, commit_sha, path)
File "./course/views.py", line 236, in get_repo_file_backend
if not is_repo_file_accessible_as(access_kind, repo, commit_sha, path):
File "./course/content.py", line 328, in is_repo_file_accessible_as
repo, attributes_path, commit_sha.encode())
File "./course/content.py", line 275, in get_raw_yaml_from_repo
get_repo_blob(repo, full_name, commit_sha).data))
File "./course/content.py", line 113, in get_repo_blob
mode, blob_sha = tree[names[-1].encode()]
TypeError: 'Blob' object has no attribute '__getitem__'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.