fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
141 stars 29 forks source link

module 'dash_uploader' has no attribute 'UploadStatus' #108

Closed VirajOke closed 4 months ago

VirajOke commented 1 year ago

The callback function.

@du.callback(
    output= Output("analyze-val", "disabled"),
    id= "dash-uploader",
)
def callback_on_completion(status: du.UploadStatus):
        return False

Error:

def callback_on_completion(status: du.UploadStatus):
AttributeError: module 'dash_uploader' has no attribute 'UploadStatus'

I am new to DU and Plotly dash development in general, have I missed something? This is error is quite unexpected as there's not much that could go wrong with this basic code. Any suggestions? Thank you in advance.

fohrloop commented 1 year ago

Which version of dash-uploader you are using?

VirajOke commented 1 year ago

I was about to close the issue because I tried the pre-release 0.7.0a1 and the error is gone now. I was probably using an old version. Maybe I'll switch to 0.6.0 from pre-release for now. Thanks for a quick response!

fohrloop commented 1 year ago

Yeah the du.UploadStatus was introduced in 0.7.0a1, so that probably explains your error :)