开发者社区 > 通义灵码 > AI编码助手 > 正文

phpstrom 运行时候报错

已解决

插件 TONGYI Lingma - Your Al Coding Assistant. Type less, Code more. 中有异常(1.1.0)。


java.lang.AssertionError: Wrong line separators: '...us($order)\r\n    {\r\n}' at offset 29
    at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2447)
    at com.intellij.openapi.editor.impl.DocumentImpl.assertValidSeparators(DocumentImpl.java:716)
    at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:544)
    at com.alibabacloud.intellij.cosy.editor.CosyInlayManagerImpl.lambda$applyCompletion$6(CosyInlayManagerImpl.java:537)
    at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:360)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:149)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:958)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:147)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:156)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:123)
    at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:360)
    at com.alibabacloud.intellij.cosy.editor.CosyInlayManagerImpl.applyCompletion(CosyInlayManagerImpl.java:516)
    at com.alibabacloud.intellij.cosy.editor.CosyInlayManagerImpl.applyCompletion(CosyInlayManagerImpl.java:507)
    at com.alibabacloud.intellij.cosy.completion.action.CosyApplyInlayAction$ApplyInlaysHandler.doExecute(CosyApplyInlayAction.java:121)
    at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:63)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
    at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:93)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:96)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:77)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:333)
    at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:585)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$9(IdeKeyEventDispatcher.java:707)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:707)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:356)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:704)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:648)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:596)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:480)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:469)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:225)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:599)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:569)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

展开
收起
伟仔520 2024-01-16 14:27:00 82 0
3 条回答
写回答
取消 提交回答
  • 欢迎使用通义灵码:https://tongyi.aliyun.com/lingma/
    官方回答

    您好,请升级到最新版本,可能是存在\r的关系

    2024-01-31 11:36:50
    赞同 展开评论 打赏
  • 北京阿里云ACE会长

    这个错误是由于在 PHPStorm 中使用了 TONGYI Lingma 插件导致的。错误信息提示说文件中的换行符不正确。在这种情况下,建议您尝试以下方法来解决这个问题:

    1. 首先,确保您的 PHP 代码中的换行符和文件分隔符设置正确。在 PHPStorm 中,您可以通过以下步骤进行检查和修改:
      a. 打开 PHPStorm,然后转到 "File" > "Settings"(或 "Preferences",具体取决于您的系统)。
      b. 在左侧导航栏中,展开 "Editor",然后点击 "File Encodings"。
      c. 在右侧窗格中,确保 "Global Encoding"、"Project Encoding" 和 "Default encoding for properties files" 设置为相同的值,例如 UTF-8。
      d. 确保 "Line Separators" 设置为 "Windows" 或 "Unix"(取决于您代码中使用的换行符)。
    2. 如果问题仍然存在,尝试禁用 TONGYI Lingma 插件,以排除插件本身的问题。要禁用插件,请执行以下操作:
      a. 打开 PHPStorm,然后转到 "File" > "Settings"(或 "Preferences",具体取决于您的系统)。
      b. 在左侧导航栏中,展开 "Plugins"。
      c. 在右侧窗格中,找到 TONGYI Lingma 插件,然后点击 "Disable"。
    2024-01-16 14:55:47
    赞同 展开评论 打赏
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    这个错误提示表明在运行 PHPStorm 时,插件 TONGYI Lingma - Your Al Coding Assistant. Type less, Code more. 出现了异常(1.1.0)。

    要解决这个问题,你可以尝试以下几个步骤:

    1. 检查插件版本:确保你的 PHPStorm 中已经安装了正确版本的插件。你可以在插件管理界面查看已安装的插件及其版本信息。如果插件版本过低或不兼容,尝试更新或重新安装插件。

    2. 重启 PHPStorm:有时候,插件的错误可能是由于某些临时问题导致的。尝试关闭 PHPStorm,然后重新启动它。这可以确保所有插件和设置都被正确地加载。

    3. 检查插件依赖:有些插件可能依赖于其他插件或库。确保你的 PHPStorm 环境中已经安装了所有必要的依赖项。你可以查看插件的文档或联系插件开发者以获取更多关于依赖的信息。

    4. 禁用插件:如果以上步骤都无法解决问题,你可以尝试禁用该插件并逐个启用其他插件,以确定是哪个插件导致了异常。这样可以帮助你找到导致问题的插件,并进行相应的修复。

    2024-01-16 14:29:50
    赞同 展开评论 打赏

基于通义大模型的 AI 编码辅助工具,支持代码智能生成、单元测试生成、问题排查、研发智能问答等功能,为开发者带来高效、流畅的编码体验。

热门讨论

热门文章

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载