I've updated a Django app to Python 3.9 and Django 4.0, and I'm getting an error on launch:
TypeError: expected string or bytes-like object
I tracked it down to this function in python3.9/site-packages/webpack_loader/loader.py
:
def filter_chunks(self, chunks):
filtered_chunks = []
for chunk in chunks:
ignore = any(regex.match(chunk)
for regex in self.config['ignores'])
if not ignore:
filtered_chunks.append(chunk)
return filtered_chunks
On the line ignore = any(regex.match(chunk)...
, regex
is undefined.
I ran brew upgrade python
, but Homebrew said:
Warning: python 3.9.13_1 already installed
What am I missing?