Questions tagged [user-warning]

22 questions
16
votes
5 answers

user warnings on msvc AND gcc?

In MSVC I have this in a header: #define STR(x) #x #define STR2(x) STR(x) #define NOTE(text) message (__FILE__ "(" STR2(__LINE__) ") : -NOTE- " #text) #define noteMacro(text) message (__FILE__ "(" STR2(__LINE__) ") : "…
user34537
13
votes
5 answers

Python 2.7 Openpyxl UserWarning

Why do I receive this warning message every time I run my code? (below). Is it possible to get rid of it? If so, how do I do that? My code: from openpyxl import load_workbook from openpyxl import Workbook wb = load_workbook('NFL.xlsx', data_only =…
jcmcdonald
  • 327
  • 1
  • 3
  • 9
7
votes
2 answers

How to assert both UserWarning and SystemExit in pytest

Assert UserWarning and SystemExit in pytest In my application I have a function that when provided with wrong argument values will raise a UserWarnings from warnings module and then raises SystemExit from sys module. Code is something like: def…
everestial007
  • 6,665
  • 7
  • 32
  • 72
6
votes
2 answers

torch meshgrid warning: in an upcoming release, it will be required to pass the indexing argument

I am trying to execute LIIF(https://github.com/yinboc/liif) and the following warning appears: /usr/local/lib/python3.7/dist-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the…
Pep Bravo
  • 67
  • 1
  • 2
  • 9
6
votes
1 answer

UserWarning: Calling close() on already closed file. warn("Calling close() on already closed file.")

This error is apparently stemming from xlsxwriter. I'm not sure on what line of my code it's coming from because my editor Visual Studio 2019 crashes every time I try to debug. But, I get this error on a laptop while on a VPN and remote desktop…
Pfalbaum
  • 586
  • 3
  • 10
  • 26
3
votes
1 answer

userWarning pymc3 : What does reparameterize mean?

I built a pymc3 model using the DensityDist distribution. I have four parameters out of which 3 use Metropolis and one uses NUTS (this is automatically chosen by the pymc3). However, I get two different UserWarnings 1.Chain 0 contains number of…
manjula
  • 35
  • 7
2
votes
1 answer

How to suppress "UserWarning" for one single function or enclosed line of code in python

I am calculating Anderson Darling k-sample statistic for every variable in a dataframe with a subset of that dataframe and adding the significance level as text to plots generated with a loop. The test generates a lengthy "UserWarning" for every…
user9329768
2
votes
1 answer

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…
Tom91
  • 23
  • 4
2
votes
1 answer

UserWarning: Boolean Series key will be reindexed to match DataFrame index

When using this statement this shows multiple warning in a single…
Harsh Sharma
  • 183
  • 1
  • 10
2
votes
1 answer

Second-order ODE dopri5 python UserWarning: larger nmax

For a second-order ODE (dopri5 method in python) the code below always results in an error: C:\Users\MY\Anaconda3\lib\site-packages\scipy\integrate\_ode.py:1019: UserWarning: dopri5: larger nmax is needed self.messages.get(idid, 'Unexpected…
KeVal
  • 351
  • 1
  • 4
  • 15
1
vote
1 answer

UserWarning: Setuptools is replacing distutils. at building Hue : sudo make apps ,it fails with :

add the development packages, build and get the development server running: "PYTHON_VER is python3.7." "Python 3 module install via pip" "SYS_PYTHON is /root/.pyenv/shims/python3.7." "ENV_PYTHON is /data/opt/hue/hue/build/env/bin/python3.7." added…
wachoo
  • 11
  • 4
1
vote
1 answer

UserWarning: color is redundantly defined by the 'color' keyword argument and the fmt string "r--" (-> color='r')

I'm new to Python programming and I'm currently working as an intern on the topic of Earthquakes, more specifically, amplification of ground shaking due to topographic site effect. My mentor has written a code to extract clusters from a whole lot of…
JulibTulip
  • 23
  • 8
1
vote
0 answers

Issue with GridSearch CV for Random Forest: UserWarning: One or more of the test scores are non-finite:

I am training to tune parameters for my random forest. I am using Grid Search CV. Here is my parameter grid. rf = RandomForestRegressor(random_state = 42) param_grid = { 'n_estimators': [100,200,300], 'max_depth': np.arange(3,8,1), …
1
vote
1 answer

what is "UserWarning: No features were selected"

I am using LassoCV() model for feature selection. It is giving me this issue and not selecting any features too. "C:\Users\xyz\Anaconda3\lib\site-packages\sklearn\feature_selection\base.py:80: UserWarning: No features were selected: either the data…
JSVJ
  • 500
  • 3
  • 14
0
votes
1 answer

How to resolve Boolean Series ReIndex warning

I have a dataframe Unnamed: 0 game score home_odds draw_odds away_odds country league datetime 0 0 Sport Recife - Imperatriz 2:2 1.36 4.31 7.66 Brazil Copa do…
leonardo
  • 140
  • 10
1
2