问题标签 [user-warning]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
9601 浏览

gcc - msvc 和 gcc 上的用户警告?

在 MSVC 中,我在标题中有这个:

我愿意

海合会有:

然而,MSVC(2003)在看到#warning并给出“致命错误 C1021:无效的预处理器命令'警告'”时会抛出一个合适的结果

我能做些什么呢?有没有办法让 GCC 识别 MSVC 警告或 MSVC 不会在 GCC 警告上引发错误?有什么我可以做的对两者都有效的吗?我可以让 GCC 警告我有关未知的编译指示,但这不是最理想的解决方案。

0 投票
3 回答
107 浏览

php - 管理用户警告

我不习惯使用应该像用户警告那样每次间隔递减的值,例如持续存在的警告可以在用户被禁止之前30 days达到最大值3 warns

我想设计一个这样的用户表,但现在我应该处理它,我发现每 30 天递减一次值没有用:

我应该使用一些 php 计时器吗?

是否存在关于用户警告的任何标准技术?

0 投票
4 回答
79921 浏览

python - 如何摆脱 BeautifulSoup 用户警告?

安装 BeautifulSoup 后,每当我在 cmd 中运行 Python 时,都会出现此警告。

我不知道为什么会出现以及如何解决它。

0 投票
4 回答
30666 浏览

python - Python 2.7 Openpyxl 用户警告

为什么每次运行代码时都会收到此警告消息?(以下)。有可能摆脱它吗?如果是这样,我该怎么做?

我的代码:

该代码有效,但我收到此警告消息:

0 投票
1 回答
2139 浏览

python - 二阶ODE dopri5 python UserWarning:较大的nmax

对于二阶 ODE(python 中的 dopri5 方法),下面的代码总是会导致错误:C:\Users\MY\Anaconda3\lib\site-packages\scipy\integrate\_ode.py:1019: UserWarning: dopri5: larger nmax is needed self.messages.get(idid, 'Unexpected idid=%s' % idid)). 我已经更改了参数,但似乎没有任何帮助。即使设置nsteps=100000也不起作用。有没有其他方法可以解决这个问题而不仅仅是增加nsteps

0 投票
2 回答
834 浏览

python - Python bs4 模块

Blockquote 并且错误说:http: //imgur.com/403a6N8
我试图修复它,但它似乎不起作用,所以任何提示/答案如何修复它?

编辑:对不起大家错误的标题和标签,一切都已修复。

0 投票
1 回答
1811 浏览

pymc3 - userWarning pymc3:重新参数化是什么意思?

我使用 DensityDist 发行版构建了一个 pymc3 模型。我有四个参数,其中 3 个使用 Metropolis,一个使用 NUTS(这是由 pymc3 自动选择的)。但是,我得到两个不同的 UserWarnings 1.Chain 0 包含调整后发散样本的数量。如果增加target_accept无济于事,请尝试重新参数化。我可以知道这里的重新参数化是什么意思吗?2.链0中的接受概率与目标不匹配。是 ,但应该接近 0.8。尝试增加调整步骤的数量。

挖掘了几个例子,我使用了“random_seed”、“discard_tuned_samples”、“step = pm.NUTS(target_accept=0.95)”等等,并摆脱了这些用户警告。但我找不到有关如何确定这些参数值的详细信息。我确信这可能已经在各种情况下进行了讨论,但我无法找到可靠的文档。我正在做如下试验和错误方法。

with patten_study: #SEED = 61290425 #51290425 step = pm.NUTS(target_accept=0.95) trace = sample(step = step)#4000,tune = 10000,step =step,discard_tuned_samples=False)#,random_seed=SEED)

我需要在不同的数据集上运行这些。因此,我正在努力为我正在使用的每个数据集修复这些参数值。有什么方法可以让我给出这些值或找到结果(如果有任何用户警告,然后尝试其他值)并循环运行它?

如果我问的是愚蠢的事情,请原谅我!

0 投票
1 回答
3193 浏览

python - 用户警告:布尔系列键将被重新索引以匹配 DataFrame 索引

使用此语句时,这会在单个语句中显示多个警告:

警告是:

/home/lubuntu/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:1:用户警告:布尔系列键将被重新索引以匹配 DataFrame 索引。"""启动 IPython 内核的入口点。/home/lubuntu/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. """启动 IPython 内核的入口点。/home/lubuntu/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:1:FutureWarning:pandas.tslib 已弃用,将在未来版本中删除。您可以访问 Timedelta 作为 pandas.Timedelta """启动 IPython 内核的入口点。/home/lubuntu/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:1: UserWarning: 布尔系列键将被重新索引以匹配 DataFrame 索引。"""启动 IPython 内核的入口点。

我找不到任何其他旋转表格的方法:

我检查过没有 to_sparse(0) 但它仍然显示它!这是一个重要的警告吗?我一直忽略它。我一直在使用通过 anaconda 安装的 Jupyter Notebook Python v3.6,如果这完全相关的话。

编辑:

节目

0 投票
1 回答
1225 浏览

python - How to ignore python UserWarning in pytest?

I am using openpyxl for parsing .xlsm files, and pytest for testing.

When I open a file, I get the:
OpenPyxl -> UserWarning: Data Validation extension is not supported and will be removed

That is not really a problem bcs. program works and I can't change the .xlsm file to fix that.

But... When I run pytest with something like:

I will get the warning i mentioned altought check_excel(open_excel('file.xlsm')) returns True and the test should suceed...

Is there a nice way to tell the pytest that "It's not a bug it's a feature" and tests should pass even when they get this warning?

Is there other way than using something like:

Thank you,
Tom

0 投票
1 回答
841 浏览

python - 什么是“用户警告:未选择任何功能”

我正在使用 LassoCV() 模型进行特征选择。它给了我这个问题,也没有选择任何功能。“C:\Users\xyz\Anaconda3\lib\site-packages\sklearn\feature_selection\base.py:80: UserWarning: 没有选择特征:要么数据太嘈杂,要么选择测试太严格。UserWarning)”

代码如下。

数据在https://www.kaggle.com/jtrofe/beer-recipes/downloads/recipeData.csv/3

我收到此警告,但未选择任何功能。

知道如何纠正这个问题吗?