stephenmcd / mezzanine

CMS framework for Django
http://mezzanine.jupo.org
BSD 2-Clause "Simplified" License
4.75k stars 1.64k forks source link

TypeError unsupported operand type(s) for +: 'frozenset' and 'list' #2062

Closed therealjohndion closed 1 year ago

therealjohndion commented 1 year ago

Is there an existing issue for this?

Current Behavior

TypeError at /admin/blog/blogpost/add/

unsupported operand type(s) for +: 'frozenset' and 'list'
Request Method: | POST -- | -- http://unixhideout.solutions:8000/admin/blog/blogpost/add/ 4.2.1 TypeError unsupported operand type(s) for +: 'frozenset' and 'list' /home/mike/mezzanine/lib/python3.11/site-packages/mezzanine/utils/html.py, line 113, in escape django.contrib.admin.options.add_view /home/mike/mezzanine/bin/python 3.11.3 ['/home/mike/mezzanine/mezzanine_project', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/home/mike/mezzanine/lib/python3.11/site-packages'] Mon, 29 May 2023 03:14:08 +0000

Expected Behavior

It should post my content. This is a default install. Im learning, but i dont think ive done anything wrong (yet.) As soon as i go add a page or content i get the above error. Thanks for any help.

Steps To Reproduce

create a page or blog post

Environment

- Operating System:
- Python version:
- Django version:
- Database engine and version:
- Mezzanine version:

Anything else?

No response

molokov commented 1 year ago

Duplicate of https://github.com/stephenmcd/mezzanine/issues/2054

The workaround is to set bleach<6 in your requirements.txt

The pull request https://github.com/stephenmcd/mezzanine/pull/2059 has not yet been merged, but you could always fork the repo and apply it yourself if you really want to use bleach 6.0

therealjohndion commented 1 year ago

Thank you so much I am excited there is a fix and i will have a site soon. But can you be more specific and explain what I now need to do like im ten?

therealjohndion commented 1 year ago

specifically, I am trying to figure it out on my own, but where is requirements.txt, and what command do i have to run to update (downgrade) the package bleach?

kenbolton commented 1 year ago

explain what I now need to do like im ten?

Likely the fastest/easiest solution for you would be to run pip install "Bleach<6".

The above advice is predicated on several assumptions about how you have things set up and how you have installed Mezzanine. If you are using a virtual environment, type which pip to be sure you are running the pip command associated with said environment.

Like everything in Python/Django/Mezzanine:

There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. .

therealjohndion commented 1 year ago

Thanks a lot my friend for your work contributions and help. I should figure it out now.