dash-uploader icon indicating copy to clipboard operation
dash-uploader copied to clipboard

module 'dash_uploader' has no attribute 'UploadStatus'

Open VirajOke opened this issue 3 years ago • 3 comments

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.

VirajOke avatar Oct 24 '22 16:10 VirajOke

Which version of dash-uploader you are using?

fohrloop avatar Oct 24 '22 17:10 fohrloop

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!

VirajOke avatar Oct 24 '22 17:10 VirajOke

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

fohrloop avatar Oct 24 '22 17:10 fohrloop