Refactor -> Rename, class attribute, "Operation is not supported"
PyCharm 2016.3.2
Build #PY-163.10154.50, built on December 28, 2016
JRE: 1.8.0_112-release-408-b6 x86
JVM: OpenJDK Server VM by JetBrains s.r.o
I am attempting to rename a class attribute by right clicking on it and selecting Refactor -> Rename...
I can run Preview all I want, but if I click Refactor or "Do Refactor" it fails with the error message "Operation is not supported"
I have checked the log file and there is nothing in there regarding rename nor any exceptions being thrown.
The class name is "Invoice" and I'm trying to change "PENDING" to "STATUS_PENDING".
Oddly, sometimes it changes the PENDING's within the same models.py file, sometimes it fails after the 2nd occurrence. It seems to be failing at random points.
Please sign in to leave a comment.
Just upgraded to the following and it's still happening
PyCharm 2017.1
Build #PY-171.3780.115, built on March 24, 2017
JRE: 1.8.0_112-release-736-b13 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
Hi Ian. Sorry for the late reply.
There is an old issue about the similar problem in our tracker that was closed back then as not reproducible. Could you please describe your case in detail so that we could re-open it and finally track down why it's still happening? Is it possible for you to attach the file with model definitions where you came across this error?
@Mikhail, I am experiencing seemingly the same issue. Moreover, another small bug on top: clicking a question mark in the Operation is not supported window leads me to 404 page on your site.
Please let me know how I can help to pin down the problem, I am happy to provide whatever code needed.
Env: Mac OS 10.12.6, PyCharm 2017.1.5
UPDATE: Just noticed: although PyCharm told me it couldn't rename the field, it actually did it, at least in the same models.py file. Not in the template. (Though I think it could never refactor field names in the templates, could it?)
KR
Konstantin
Hi Konstantin! Please vote for PY-16735.