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

RuntimeWarning with slopes #90

Open
nicogodet opened this issue May 29, 2023 · 0 comments
Open

RuntimeWarning with slopes #90

nicogodet opened this issue May 29, 2023 · 0 comments
Labels

Comments

@nicogodet
Copy link
Collaborator

2023-05-29T09:58:33     WARNING    warning:C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py:46: RuntimeWarning: invalid value encountered in divide
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])
             
             traceback: File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 97, in 
              self.dockwidget.plotComboBox.currentIndexChanged.connect(lambda index: self.plotProfil())
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 235, in plotProfil
              profile["plot_x"], profile["plot_y"] = profile_func(profile)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 46, in slopes_pct
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])
             
2023-05-29T09:58:57     WARNING    warning:C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py:46: RuntimeWarning: invalid value encountered in divide
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])
             
             traceback: File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 97, in 
              self.dockwidget.plotComboBox.currentIndexChanged.connect(lambda index: self.plotProfil())
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profiletool_core.py", line 235, in plotProfil
              profile["plot_x"], profile["plot_y"] = profile_func(profile)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 59, in slopes_deg
              x, slope_pct = slopes_pct(p)
              File "C:\Users/godet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\profiletool\tools\profilers.py", line 46, in slopes_pct
              slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])

As reminder for my todolist

@nicogodet nicogodet added the bug label May 29, 2023
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

1 participant