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

ZeroDivisionError: float division by zero #184

Closed
2 tasks
heya5 opened this issue Jun 27, 2022 · 8 comments
Closed
2 tasks

ZeroDivisionError: float division by zero #184

heya5 opened this issue Jun 27, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@heya5
Copy link

heya5 commented Jun 27, 2022

General

  • Operating System: windows 11
  • Python version: 3.8.3
  • Pandas version: 1.4.2
  • Pandarallel version: 1.6.1

Acknowledgement

  • My issue is NOT present when using pandas without alone (without pandarallel)
  • If I am on Windows, I read the Troubleshooting page
    before writing a new bug report

Bug description

WARNING: You are on Windows. If you detect any issue with pandarallel, be sure you checked out the Troubleshooting page:
0.99% | 46 / 4628 |
0.00% | 0 / 4627 | multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\multiprocessing\pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\core.py", line 158, in call
results = self.work_function(
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\data_types\series.py", line 26, in work
return data.apply(
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\series.py", line 4433, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\apply.py", line 1082, in apply
return self.apply_standard()
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\apply.py", line 1137, in apply_standard
mapped = lib.map_infer(
File "pandas_libs\lib.pyx", line 2870, in pandas._libs.lib.map_infer
File "D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\progress_bars.py", line 206, in closure
state.next_put_iteration += max(int((delta_i / delta_t) * 0.25), 1)
ZeroDivisionError: float division by zero

Observed behavior

Write here the observed behavior

Expected behavior

Write here the expected behavior

Minimal but working code sample to ease bug fix for pandarallel team

Write here the minimal code sample to ease bug fix for pandarallel team

@felixsc1
Copy link

felixsc1 commented Jun 28, 2022

same problem here, one of the progress bars turns red at some percentage point (different every time) and stops progressing, then after the others complete, I get the division by zero error.
It DOESN'T happen with progress_bar=False (im using python 3.9.0, windows10 running it in vscode)

@till-m
Copy link
Collaborator

till-m commented Aug 17, 2022

Hi @heya5 @felixsc1,

Unfortunately I don't have access to a windows machine. Is there any chance one of you would be able to investigate and/or fix this bug?

@till-m till-m added the bug Something isn't working label Sep 12, 2022
@dacianpeng
Copy link

same problem here, and progress_bar=False do not fix this too

@versatile712
Copy link

versatile712 commented Nov 10, 2022

I also run into the problem. Sometimes rerunning the codes helps, but it wastes a lot of time. Hope it can be fixed.

@till-m
Copy link
Collaborator

till-m commented Nov 10, 2022

Hi @theGreen-Coder

If you can provide a snippet that reproduces the problem I can try to fix the problem, I have access to an M1 Mac.

@till-m
Copy link
Collaborator

till-m commented Nov 11, 2022

Hi @theGreen-Coder,

maybe I'm missing something, but it looks like you're not actually using pandarallel. The error you're seeing also seems to originate from diffxpy and not pandarallel. Could you verify that the problem you're seeing actually comes from this package?

@theGreen-Coder
Copy link

Oops. Yeah, sorry I thought this was on diffxpy. My bad.

@till-m
Copy link
Collaborator

till-m commented Dec 6, 2022

should be fixed with #212. I will close this issue, if the problem persists please let me know and I will reopen.

@till-m till-m closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants