You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a warning for others - be very careful using optparse in nicegui scripts. Not just directly (obviously little need for that) - check all modules in your import subtree too. optparse issues a hard sys.exit on parse errors. Python devs are aware and DGAF.
Imagine my surprise when a user page called a legacy python module on my server, which unbeknownst to me uses optparse. Parser got a malformed flag and BLAMO - entire nicegui server came crashing down.
Python devs... seriously WTF... 🤦
(to be clear, this issue is not nicegui's fault in any way. 100% blame on python stdlib)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Just a warning for others - be very careful using optparse in nicegui scripts. Not just directly (obviously little need for that) - check all modules in your import subtree too. optparse issues a hard
sys.exit
on parse errors. Python devs are aware and DGAF.Imagine my surprise when a user page called a legacy python module on my server, which unbeknownst to me uses optparse. Parser got a malformed flag and BLAMO - entire nicegui server came crashing down.
Python devs... seriously WTF... 🤦
(to be clear, this issue is not nicegui's fault in any way. 100% blame on python stdlib)
Beta Was this translation helpful? Give feedback.
All reactions