internetarchive / internetarchive/openlibrary

MemcachedKeyCharacterError: Control/space characters not allowed

Open
#11,103 2 comments 0 reactions 0 assignees View on GitHub
Lead: @jimchamp Needs: Breakdown Priority: 4 State: Blocked Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

### Problem

```
/openlibrary/openlibrary/templates/type/author/view.html: error in processing template: MemcachedKeyCharacterError: Control/space characters not allowed (key=b'lending.get_availability-"identifier","ADF Project #94000114"') (falling back to default template)
```

https://openlibrary.org/authors/OL341837A/Z._M._Abouguendia

Image

### Reproducing the bug

1. Go to ...
2. Do ...

* Expected behavior:
* Actual behavior:

### Context

- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N):
- Environment (prod, dev, local): prod

### Breakdown

#### Requirements Checklist
* [ ]

#### Related files

*

#### Stakeholders

*


#### Instructions for Contributors

- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Research direction

Start with templates/type/author/view.html and trace the lending.get_availability lookup that produces the MemcachedKeyCharacterError for the linked author page. Check the cache-key handling and reproduce the page locally; done means the author page renders without this error for identifiers containing spaces or control characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
memcached, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.