Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
therealjohndion opened this issue May 29, 2023 · 5 comments
Closed
1 task done

Comments

@therealjohndion
Copy link

Is there an existing issue for this?

  • I have searched the existing Issues

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
Copy link
Contributor

molokov commented May 29, 2023

Duplicate of #2054

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

The pull request #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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants