-
Notifications
You must be signed in to change notification settings - Fork 881
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 exception while open cfile #615
Comments
Can't fix this right now as I am on vacation but as a workaround you can use Edit menu and uncheck the auto detect newly loaded signals (exact caption may vary) checkbox.
Am 14. Februar 2019 12:59:06 OEZ schrieb "0RÎᑭÎ0" <[email protected]>:
…##### Expected Behavior
While open cfile I'm getting error:
Error: float division by zero
----------
Traceback (most recent call last):
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 781, in show_open_dialog
self.add_files(file_names)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 402, in add_files
self.add_signalfile(filename, group_id,
enforce_sample_rate=enforce_sample_rate)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 288, in add_signalfile
self.add_signal(signal, group_id)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 302, in add_signal
signal.auto_detect(detect_modulation=True, detect_noise=False)
File
"/usr/local/lib/python3.5/dist-packages/urh/signalprocessing/Signal.py",
line 381, in auto_detect
estimated_params = AutoInterpretation.estimate(self.data, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py",
line 378, in estimate
center = detect_center(msg_rect_data)
File
"/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py",
line 207, in detect_center
y, x = np.histogram(rect, bins=np.arange(hist_min, hist_max +
hist_step, hist_step))
ZeroDivisionError: float division by zero
##### Actual Behavior
##### Steps To Reproduce
<!-- Explain the steps to reproduce the behavior. -->
1. Go to 'File'
2. Click on 'Open'
3. Select any cfile
4. Click on 'Open'
5. Get an error
##### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
##### Platform Specifications
<!-- please complete the following information -->
- OS: Debian Linux (Linux Mint LMDE 3 Cindy)
- URH version: 2.5.5
- Python version: 3.5.3
- Installed via pip
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#615
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
Furthermore it would be cool if you can upload the signal which causes this crash for further investigation.
Am 14. Februar 2019 12:59:06 OEZ schrieb "0RÎᑭÎ0" <[email protected]>:
…##### Expected Behavior
While open cfile I'm getting error:
Error: float division by zero
----------
Traceback (most recent call last):
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 781, in show_open_dialog
self.add_files(file_names)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 402, in add_files
self.add_signalfile(filename, group_id,
enforce_sample_rate=enforce_sample_rate)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 288, in add_signalfile
self.add_signal(signal, group_id)
File
"/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py",
line 302, in add_signal
signal.auto_detect(detect_modulation=True, detect_noise=False)
File
"/usr/local/lib/python3.5/dist-packages/urh/signalprocessing/Signal.py",
line 381, in auto_detect
estimated_params = AutoInterpretation.estimate(self.data, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py",
line 378, in estimate
center = detect_center(msg_rect_data)
File
"/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py",
line 207, in detect_center
y, x = np.histogram(rect, bins=np.arange(hist_min, hist_max +
hist_step, hist_step))
ZeroDivisionError: float division by zero
##### Actual Behavior
##### Steps To Reproduce
<!-- Explain the steps to reproduce the behavior. -->
1. Go to 'File'
2. Click on 'Open'
3. Select any cfile
4. Click on 'Open'
5. Get an error
##### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
##### Platform Specifications
<!-- please complete the following information -->
- OS: Debian Linux (Linux Mint LMDE 3 Cindy)
- URH version: 2.5.5
- Python version: 3.5.3
- Installed via pip
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#615
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
If I uncheck this - it opens fine but once I click to 'Autodetect parameters' - it crashes in the same way. Here is the file which generates an exception: https://ufile.io/p4xih |
If a signal has segments with zero variance i.e. constant lines, the center detection crashes because the histogram can not be created. This fix catches the ZeroDivision error and returns None in that case.
Expected Behavior
While open cfile I'm getting error:
Error: float division by zero
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py", line 781, in show_open_dialog
self.add_files(file_names)
File "/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py", line 402, in add_files
self.add_signalfile(filename, group_id, enforce_sample_rate=enforce_sample_rate)
File "/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py", line 288, in add_signalfile
self.add_signal(signal, group_id)
File "/usr/local/lib/python3.5/dist-packages/urh/controller/MainController.py", line 302, in add_signal
signal.auto_detect(detect_modulation=True, detect_noise=False)
File "/usr/local/lib/python3.5/dist-packages/urh/signalprocessing/Signal.py", line 381, in auto_detect
estimated_params = AutoInterpretation.estimate(self.data, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py", line 378, in estimate
center = detect_center(msg_rect_data)
File "/usr/local/lib/python3.5/dist-packages/urh/ainterpretation/AutoInterpretation.py", line 207, in detect_center
y, x = np.histogram(rect, bins=np.arange(hist_min, hist_max + hist_step, hist_step))
ZeroDivisionError: float division by zero
Actual Behavior
Steps To Reproduce
Screenshots
Platform Specifications
The text was updated successfully, but these errors were encountered: