PyCharm - 无法保存设置 - 无法保存设置.请重启 P

PyCharm - Unable to save settings - Failed to save settings. Please restart PyCharm Community Edition(PyCharm - 无法保存设置 - 无法保存设置.请重启 PyCharm 社区版)
本文介绍了PyCharm - 无法保存设置 - 无法保存设置.请重启 PyCharm 社区版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我保存时 PyCharm 抛出此异常.

PyCharm is trowing this exception when I save.

WARN - mponents.impl.stores.StoreUtil - Save settings failed
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:658)
    at com.intellij.configurationStore.ApplicationStorageManager.expandMacros(ApplicationStoreImpl.kt:108)
    at com.intellij.configurationStore.StateStorageManagerImpl.createStateStorage(StateStorageManagerImpl.kt:194)
    at com.intellij.configurationStore.StateStorageManagerImpl.getOrCreateStorage(StateStorageManagerImpl.kt:150)
    at com.intellij.configurationStore.StateStorageManagerImpl.getStateStorage(StateStorageManagerImpl.kt:133)
    at com.intellij.configurationStore.StateStorageManagerImpl$startExternalization$1.setState(StateStorageManagerImpl.kt:342)
    at com.intellij.configurationStore.ComponentStoreImpl.commitComponent(ComponentStoreImpl.kt:199)
    at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:124)
    at com.intellij.openapi.components.impl.stores.StoreUtil.save(StoreUtil.java:49)
    at com.intellij.openapi.application.impl.ApplicationImpl.saveSettings(ApplicationImpl.java:1433)
    at com.intellij.ide.SaveAndSyncHandlerImpl.doSaveDocumentsAndProjectsAndApp(SaveAndSyncHandlerImpl.java:150)
    at com.intellij.ide.SaveAndSyncHandlerImpl.saveProjectsAndDocuments(SaveAndSyncHandlerImpl.java:134)
    at com.intellij.ide.SaveAndSyncHandlerImpl$4.onFrameDeactivated(SaveAndSyncHandlerImpl.java:104)
    at com.intellij.ide.FrameStateManagerImpl.fireDeactivationEvent(FrameStateManagerImpl.java:87)
    at com.intellij.ide.FrameStateManagerImpl.access$500(FrameStateManagerImpl.java:32)
    at com.intellij.ide.FrameStateManagerImpl$2$1.run(FrameStateManagerImpl.java:72)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:337)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

并给我这个错误信息.

我认为这不是 .idea 文件或类似文件的权限问题,但我真的不确定.

I don't think it's a problem of permissions on the .idea file or anything like that, but I'm really not sure.

我在堆栈跟踪中收到了一些其他错误和警告,但这是我尝试保存项目时再次出现的错误和警告.

I get some other errors and warnings in the stack trace, but this is the one that recurs when I try to save projects.

当我像这样使用 sudo 运行 PyCharm CE 时,这个问题仍然存在sudo -u [用户名]/Applications/PyCharm CE.app/Contents/MacOS/pycharm

This problem persists when I run PyCharm CE with sudo like this sudo -u [username] /Applications/PyCharm CE.app/Contents/MacOS/pycharm

有人有什么想法吗?

操作系统:MacOS El CapitanPycharm:PyCharm 社区版 5.0.5JRE:1.8.0_76-release-b162 x86_64JVM:JetBrains s.r.o. 的 OpenJDK 64 位服务器虚拟机

OS: MacOS El Capitan Pycharm: PyCharm Community Edition 5.0.5 JRE: 1.8.0_76-release-b162 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

推荐答案

确保您以管理员身份运行Pycharm.exe".

Make sure you are running 'Pycharm.exe' as Administrator.

所有用户的以管理员身份运行"解决了 Windows 操作系统中的这个问题.

'Run As Administrator' for all Users solves this problem in Windows OS.

这篇关于PyCharm - 无法保存设置 - 无法保存设置.请重启 PyCharm 社区版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How can create a producer using Spring Cloud Kafka Stream 3.1(如何使用Spring Cloud Kafka Stream 3.1创建制片人)
Insert a position in a linked list Java(在链接列表中插入位置Java)
Did I write this constructor properly?(我是否正确地编写了这个构造函数?)
Head value set to null but tail value still gets displayed(Head值设置为空,但仍显示Tail值)
printing nodes from a singly-linked list(打印单链接列表中的节点)
Control namespace prefixes in web services?(控制Web服务中的命名空间前缀?)