cobrateam / cobrateam/django-htmlmin

TypeError: object of type 'NoneType' has no len()

Open
#74 12 comments 0 reactions 1 assignee View on GitHub

@andrewsmedina is already working on this.

Since Aug 5, 2014.

Dominant language
Python
Stars
542
Forks
72
PR merge metrics
No merged PRs in 30d

Description

I am trying to minify .html file with:

``` python
html = "..."
from htmlmin.minify import html_minify
html = html_minify(html)
```

If I put any hebrew letter inside the html I get:

```
Traceback (most recent call last):
File "", line 22, in
File "/root/.virtualenvs/me_etcs/lib/python2.6/site-packages/htmlmin/minify.py", line 38, in html_minify
soup = bs4.BeautifulSoup(html_code, parser)
File "/root/.virtualenvs/me_etcs/lib/python2.6/site-packages/bs4/__init__.py", line 162, in __init__
elif len(markup) <= 256:
TypeError: object of type 'NoneType' has no len()
```

What can be done please to allow hebrew chars inside template?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.