Getting AttributeError: 'module' object (scipy) has no attribute 'misc' in Python. How to solve this?

0 votes

Python module I have written suddenly no longer works with the error message that the module scipy does not have the attribute 'misc'.  I am still using python 2.7 after the update. 

I just updated Ubuntu to its latest stable version and that's about it.

Here is where the code crashes

import scipy
scipy.misc.imsave(slice,dat)

Any ideas on how to fix this? Appreciate some help!

Dec 24, 2018 in Python by Anirudh
• 2,060 points
622 views

1 answer to this question.

0 votes
>>> import scipy
>>> scipy.misc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'misc'
>>> 
>>> 
>>> import scipy.misc
>>> scipy.misc.imsave
<function imsave at 0x19cfa28>
>>>

This is very common with scipy. Cheers!

answered Dec 24, 2018 by Nymeria
• 3,500 points

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

Python Pandas error: AttributeError: 'DataFrame' object has no attribute 'rows'

There is no attribute called “rows”. The ...READ MORE

answered Mar 28 in Python by Shri
1,300 views
0 votes
1 answer

Python error "AttributeError: 'Turtle' object has no attribute 'Shape'"

Hey @Nagya, replace python.Shape("Square") with the following: python.shape("square") Python is case ...READ MORE

answered Jun 19 in Python by Faiza
61 views
0 votes
1 answer

Python error "AttributeError: 'str' object has no attribute 'casefold'"

Check your python version. Casefold is possible ...READ MORE

answered Jul 4 in Python by Yesha
54 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 135 views
+4 votes
6 answers
0 votes
1 answer

How to convert a Pandas GroupBy object to DataFrame in Python

g1 here is a DataFrame. It has a hierarchical index, ...READ MORE

answered Nov 12, 2018 in Python by Nymeria
• 3,500 points
3,726 views
0 votes
1 answer

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,500 points
7,783 views