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

AttributeError: 'tqdm' object has no attribute 'delay' #90

Open
analyticsrunner opened this issue May 12, 2021 · 7 comments
Open

AttributeError: 'tqdm' object has no attribute 'delay' #90

analyticsrunner opened this issue May 12, 2021 · 7 comments
Labels

Comments

@analyticsrunner
Copy link

pip install sweetviz
import sweetviz as sv
my_report = sv.analyze(df)

AttributeError Traceback (most recent call last)
in ()
1 # importing sweetviz
2 import sweetviz as sv
----> 3 my_report = sv.analyze(df)
4 #my_report.show_html("EDA kick-starter.html")

/usr/local/lib/python3.7/dist-packages/tqdm/notebook.py in init(self, *args, **kwargs)
240 self.container.pbar = self
241 self.displayed = False
--> 242 if display_here and self.delay <= 0:
243 display(self.container)
244 self.displayed = True

AttributeError: 'tqdm' object has no attribute 'delay'

@fbdesignpro
Copy link
Owner

Hi @analyticsrunner! Apologies for the delay in answering; I have never heard of this issue, but it could be related to the environment. Can you tell me what environment you are running it from? (Also environment, Python version etc.) I will try to get this fixed!

@fbdesignpro fbdesignpro self-assigned this May 24, 2021
@ana-gleice
Copy link

Hi, @fbdesignpro, I would like to enjoy the opportunity to add the same issue.
I am using google.colab to execute "ProfileRepor", and it return:

AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/IPython/core/formatters.py in call(self, obj)
336 method = get_real_method(obj, self.print_method)
337 if method is not None:
--> 338 return method()
339 return None
340 else:

10 frames
/usr/local/lib/python3.7/dist-packages/tqdm/notebook.py in init(self, *args, **kwargs)
240 self.container.pbar = self
241 self.displayed = False
--> 242 if display_here and self.delay <= 0:
243 display(self.container)
244 self.displayed = True

AttributeError: 'tqdm' object has no attribute 'delay'

@fbdesignpro
Copy link
Owner

Hi @ana-gleice, thank you for the report. This is really puzzling as I am able to run Colab and I'm having trouble reproducing this. This error is not showing up in Google for any tqdm case.

The fact that 2 of you are having the issue means is not that rare but I'm not sure where to begin searching.

There have been a few issues related to version differences, can you tell what version of tqdm is installed on your Colab?

@fbdesignpro fbdesignpro added bug Something isn't working can't repro issue labels May 26, 2021
@fbdesignpro fbdesignpro removed their assignment May 27, 2021
@fbdesignpro
Copy link
Owner

@analyticsrunner @ana-gleice after looking at this in multiple ways and looking at similar issues with tqdm, it looks like this could be a version mismatch and uninstalling then reinstalling tqdm should solve the issue. Some people report having to manually remove tqdm files.

I know this might be a bit of an issue running in Colab, but if you are anyone else is still having this issue, I would love to know which version of tqdm and environment/python are installed.

For example, see https://stackoverflow.com/questions/59293977/cant-find-object-method-in-interactive-session

@iagorichard
Copy link

iagorichard commented Jul 9, 2021

Probably you are using a newer tqdm version.

I'm not sure when but the delay attribute got deprecated.

As emergence solution, I have downgraded the tqdm version to 2.0.0 (I'm using google colab), and it worked fine! :)

Here are the commands to do that:
!pip uninstall tqdm
!pip install tqdm==2.0.0

@timothyslau
Copy link

Probably you are using a newer tqdm version.

I'm not sure when but the delay attribute got deprecated.

As emergence solution, I have downgraded the tqdm version to 2.0.0 (I'm using google colab), and it worked fine! :)

Here are the commands to do that:
!pip uninstall tqdm !pip install tqdm==2.0.0

This solution worked for me, but is not ideal.

@fbdesignpro
Copy link
Owner

@iagorichard thank you for the workaround! @timothyslau I'm glad it's helping, even if not ideal as you say.

This does look like a version mismatch issue, but perhaps with legacy/multiple versions in the environment, not sure what the best general solution is. The install requirement is tqdm>=4.43.0 and it seems to work with that version, yet it works with your 2.0.0 :/

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

No branches or pull requests

5 participants