MattIPv4 / PyDMXControl

A Python 3 module to control DMX using OpenDMX or uDMX - Featuring fixture profiles, built-in effects and a web control panel.
https://pypi.org/project/PyDMXControl/
GNU General Public License v3.0
121 stars 23 forks source link

"ValueError: 'name' may not be empty." when Flask 2.3.x installed #45

Closed forceflow1049 closed 11 months ago

forceflow1049 commented 1 year ago

Flask appears to have made a change in the 2.3.x series that the name of a Blueprint cannot be the empty string.

For example, with Flask 2.3.2 installed, importing

from PyDMXControl.controllers import OpenDMXController

results in the exception:

File "C:\Users\ASC\Documents\constellation-dev\build\apps\venv_3_11\Lib\site-packages\PyDMXControl\web\_routes.py", line 17, in <module>
    routes = Blueprint('', __name__, url_prefix='/')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ASC\Documents\constellation-dev\build\apps\venv_3_11\Lib\site-packages\flask\blueprints.py", line 196, in __init__
    raise ValueError("'name' may not be empty.")
ValueError: 'name' may not be empty.

I have verified this in Windows and macOS. Forcing the install of Flask 2.2.4 resolves this problem. The fix should be as easy as replacing '' with any value.

pauljurczak commented 1 year ago

The same (obviously) on Ubuntu 22.04.2 with Python 3.11.3.

pip install --force-reinstall flask==2.2.4

Fixes it.

ZotAlan commented 1 year ago

This worked for me. Thanks.

MattIPv4 commented 11 months ago

53