In my case, I got the error upon entering the first line into an ipython buffer. This appears to be a known bug in python-mode 6.0.4.
Asked
Active
Viewed 819 times
2 Answers
1
My solution was to edit lines 1565-1566 of python-mode.el like so.
(let ((lastindent (if
(py-beginning-of-statement-p)
(current-indentation)
(progn
- (py-down-statement)
- (current-indentation)))))
+ (py-down-statement)
+ (current-indentation))))
+ erg)
Also, this is fixed in 6.0.5

Johnny Brown
- 1,000
- 11
- 18