DeprecationWarning with matplotlib and dateutil - python

Since i've installed the last version of matplotlib (1.5.1), I have the following error when i try to plot values with datetime as X.
DeprecationWarning: Using both 'count' and 'until' is inconsistent
with RFC 2445 and has been deprecated in dateutil. Future versions
will raise an error.
Does someone met ths error, and knows how to correct it ?

The issue have been fixed on matplotlib, but not released in a finalised version (>= 1.5.2)
I had to install the current working version with
pip install git+https://github.com/matplotlib/matplotlib

First of all it is not an error. It's a warning.
Second, most likely the problem is not your problem rather a problem in Matplotlib, which need to fix how they call a function or some method form python-dateutil. Most likely, you can ignore this warning, and it will be fixed in the next Matplotlib version.

Best solution :
in the file /matplotlib/dates.py, the line 830 :
self.rule.set(dtstart=start, until=stop, count=self.MAXTICKS + 1)
shall be commented

Related

AttributeError: module 'numpy' has no attribute 'typeDict'

I am trying to install TensorFlow in Python. I am getting the following error message, I tried uninstalling NumPy and re-installing NumPy but still getting the same error message. Can someone please help me to resolve this issue?
AttributeError: module 'numpy' has no attribute 'typeDict'
I was trying to use the package pyensembl and ran into this same issue. I was able to work around it for now with
pip install numpy==1.21
Which should suffice until some of these less active packages are able to update to the new API.
As we can see in NumPy 1.21.0 Release Notes
np.typeDict is a deprecated alias for np.sctypeDict and has been so
for over 14 years
(6689502).
A deprecation warning will now be issued whenever getting np.typeDict.
(gh-17586)
This means you are using a NumPy version that removed the deprecated ways AND the library you are using wasn't updated to match that version (uses something like np.typeDict instead of np.sctypeDict).
You have at least three options now
Report the issue and wait until it gets fixed by TensorFlow.
Use an older version of numpy (one before it started to issue the deprecation warning) and wait for it to be fixed.
Change np.typeDict to np.sctypeDict wherever is being used.

How to find the version of Spacy and python used in a pickle file?

I want to open the following pickle file that I dumped a few months ago, but I get the following error.
dataset_s = pickle.load(open("dataset_s.pickle",'rb'))
AttributeError: Can't get attribute 'cluster' on <module 'spacy.lang.lex_attrs' from ...
Also, when I want to import the packages that I used, I get the following warning.
DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in
the future. Please pass the result to `transformed_cell` argument and any exception
that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17
and above, and should_run_async(code)
Can someone help me resolve these issues?
If you are getting this file from Github, it is very likely that they have a file called requirements.txt where they describe the version requirements for packages.
Depending on the environment are you using, there are even different ways you can you can set up the environment to automatically update/reverse based on the requirements.txt:
Pycharm
Conda
Warning does not influence your current run, but it is best to change your code to be compatible with the future versions of the package according to it. Or you can also save the version information and reverse to older version package in the future.

module 'skimage.filters' has no attribute 'gaussian_filter'

I'm trying to run this example, but getting the following error:
AttributeError: module 'skimage.filters' has no attribute 'gaussian_filter'
I checked the documentation, here, and see that filters has gaussian_filter. What might be wrong?
Thanks.
gaussian_filter has been removed in skimage 0.14.0 (see the release notes - http://scikit-image.org/docs/stable/api_changes.html). You should now use skimage.filters.gaussian (http://scikit-image.org/docs/0.14.x/api/skimage.filters.html#skimage.filters.gaussian).
I had a similar problem with the mahotas module, which was because of the version. Un-installed and re-installed an older version resolved the problem

module 'scipy.signal' has no attribute 'stft'

According to docs, there is a
scipy.signal.stft
but when trying to access that function I get the error from the title. The function is documented here.
Also, scip.signal.istft does not exist either. Any suggestions?
From the docs:
New in version 0.19.0.
http://scipy.github.io/devdocs/generated/scipy.signal.stft.html#scipy.signal.stft
You need to check your module version, you van refer to this post.
stft func is added in the SciPy 0.19.0, check this post to upgrade your module to the newsest version.
You need to upgrade to v 0.19.0. I tried many ways to do that but always got 0.18 instead. So to upgrade to 0.19.0 just simply do
pip install scipy==0.19.0

Error in loadNamespace(name) Cairo

It's my first time using R in jupyter. I've installed everything like jupyter, python, R and lRkernel. I can use just typing or calculation in jupyter but whenever I want to use a graph library like plot or ggplot2 it shows
Error in loadNamespace(name): there is no package called 'Cairo'
Traceback: plot without title
Someone please guide me about how to handle this issue.
I had the precise same issue and fixed it by installing Cairo package:
install.packages("Cairo")`
library(Cairo)
Thanks to my collegue Bartek for providing this solution

Categories