CaKrome / pycharm-ce-foss-build

PyCharm Community Edition rebuild.
4 stars 1 forks source link

Pycharm环境下matplotlib的plt.plot() / plt.bar()运行崩溃 #2

Closed Tony-xie2021 closed 4 months ago

Tony-xie2021 commented 2 years ago

我有一段用matplotlib的plot画图功能程序,该代码在Jupyter下单独运行可以,但在Pycharm环境下调试在运行plot指令时即刻崩溃.我在程序开始有一个pandas的读数据库的指令,后来发现,我只要去掉这个pandas的读数据库指令(pd.read_sql/pd.read_excel),程序调试就可以正常调试. 是什么问题呢? 换了3台电脑都一样问题存在. 运行环境:win10 , Python 3.10.4 , Pycharm2021.3 报错信息如下: Traceback (most recent call last): File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\getlimits.py", line 459, in new dtype = numeric.dtype(dtype) TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:/python_project/rcu_proj/qydatanalysis.py", line 583, in built_reportor plt.bar(x=[var[fig_no].index[i][-2:] for i in range(len(var[fig_no].index))], height=var[fig_no][var[fig_no].columns[y_no]], File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\pyplot.py", line 2387, in bar return gca().bar( File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib__init.py", line 1412, in inner return func(ax, map(sanitize_sequence, args), kwargs) File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_axes.py", line 2317, in bar self._process_unit_info( File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_base.py", line 2521, in _process_unit_info axis.update_units(data) File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axis.py", line 1454, in update_units self._update_axisinfo() File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axis.py", line 1490, in _update_axisinfo self.set_default_intervals() File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axis.py", line 2253, in set_default_intervals not self.axes.viewLim.mutatedx()): File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_base.py", line 781, in viewLim self._unstale_viewLim() File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_base.py", line 776, in _unstale_viewLim self.autoscale_view({f"scale{name}": scale File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_base.py", line 2932, in autoscale_view handle_single_axis( File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes_base.py", line 2928, in handle_single_axis x0, x1 = locator.view_limits(x0, x1) File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\ticker.py", line 1662, in view_limits return mtransforms.nonsingular(vmin, vmax) File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\transforms.py", line 2880, in nonsingular if maxabsvalue < (1e6 / tiny) np.finfo(float).tiny: File "C:\Users\xwhxi\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\getlimits.py", line 462, in new__ dtype = numeric.dtype(type(dtype)) TypeError: 'NoneType' object is not callable

CaKrome commented 2 years ago

Hello, it looks like you are running Microsoft Windows, however this project is for GNU/Linux only. I guess you might be looking at the wrong place. Please report to JetBrains for issues with the PyCharm windows version. Thank you

CaKrome commented 4 months ago

closing for no activity