Pycharm enable IntelliBot #patched后,工程无法打开

文章讲述了用户在使用PyCharm2023.12Pro时遇到的问题,包括IntelliBot插件冲突导致工程文件无法打开,以及配置ExternalTools后的RunCase执行错误。解决方法包括卸载冲突插件、手动安装特定版本的插件,并调整配置。

#本地环境#

Pycharm:2023.12 Pro

对应robot pkg版本:

robotframework                 6.1
robotframework-databaselibrary 1.2.4
robotframework-pythonlibcore   4.1.2
robotframework-requests        0.9.4
robotframework-seleniumlibrary 6.1.0

#Issue1#

当在Plugins搜索、安装 IntelliBot #patched,重启后,Pycharm无法打开原有工程文件

com.intellij.diagnostic.PluginException: Short name 'RobotKeywordNotFound' is not unique
class 'com.github.jnhyperion.hyperrobotframeworkplugin.ide.inspections.compilation.RobotKeywordNotFound' in PluginDescriptor(name=Hyper RobotFramework Support, id=com.github.jnhyperion.hyperrobotframeworkplugin, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\PyCharm2023.2\plugins\Hyper RobotFramework Support, version=0.1.11, package=null, isBundled=false)
and class 'com.millennialmedia.intellibot.ide.inspections.compilation.RobotKeywordNotFound' in PluginDescriptor(name=IntelliBot #patched, id=com.millennialmedia.intellibot@lte2000, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\PyCharm2023.2\plugins\intellibot.jar, version=0.16.191.8026, package=null, isBundled=false)
conflict
	at com.intellij.codeInspection.ex.InspectionToolRegistrarKt.checkForDuplicateShortName(InspectionToolRegistrar.kt:178)
	at com.intellij.codeInspection.ex.InspectionToolRegistrarKt.registerInspection(InspectionToolRegistrar.kt:137)
	at com.intellij.codeInspection.ex.InspectionToolRegistrarKt.access$registerInspection(InspectionToolRegistrar.kt:1)
	at com.intellij.codeInspection.ex.InspectionToolRegistrar.registerInspections(InspectionToolRegistrar.kt:69)
	at com.intellij.codeInspection.ex.InspectionToolRegistrar.<init>(InspectionToolRegistrar.kt:51)
	at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:962)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:954)
	at com.intellij.serviceContainer.ComponentManagerImpl.createLightService(ComponentManagerImpl.kt:933)
	at com.intellij.serviceContainer.ComponentManagerImpl.getOrCreateLightService(ComponentManagerImpl.kt:736)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:688)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:630)
	at com.intellij.codeInspection.ex.InspectionToolRegistrar$Companion.getInstance(InspectionToolRegistrar.kt:209)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase$schemeManager$1.createScheme(ApplicationInspectionProfileManagerBase.kt:59)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase$schemeManager$1.createScheme(ApplicationInspectionProfileManagerBase.kt:51)
	at com.intellij.configurationStore.LazySchemeProcessor.createScheme$default(scheme-impl.kt:63)
	at com.intellij.configurationStore.schemeManager.SchemeLoader.loadScheme(schemeLoader.kt:182)
	at com.intellij.configurationStore.schemeManager.SchemeManagerImpl.loadSchemes(SchemeManagerImpl.kt:261)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase$profilesAreInitialized$2.invoke(ApplicationInspectionProfileManagerBase.kt:84)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase$profilesAreInitialized$2.invoke(ApplicationInspectionProfileManagerBase.kt:77)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase.getProfilesAreInitialized(ApplicationInspectionProfileManagerBase.kt:77)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase.initProfiles(ApplicationInspectionProfileManagerBase.kt:103)
	at com.intellij.codeInspection.ex.ApplicationInspectionProfileManagerBase.getCurrentProfile(ApplicationInspectionProfileManagerBase.kt:131)
	at com.intellij.profile.codeInspection.ProjectInspectionProfileManager.getCurrentProfile(ProjectInspectionProfileManager.kt:238)
	at com.intellij.configurationScript.inspection.ExternallyConfigurableProjectInspectionProfileManager.getCurrentProfile(ExternallyConfigurableProjectInspectionProfileManager.kt:69)
	at com.intellij.profile.codeInspection.ProjectInspectionProfileManager.initializeComponent(ProjectInspectionProfileManager.kt:98)
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:133)
	at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:48)
	at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:577)
	at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:51)
	at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:43)
	at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:158)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:137)
	at com.intellij.serviceContainer.BaseComponentAdapter.access$createInstance(BaseComponentAdapter.kt:21)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invokeSuspend(BaseComponentAdapter.kt:185)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceAsync(BaseComponentAdapter.kt:180)
	at com.intellij.serviceContainer.ComponentManagerImpl.preloadService$suspendImpl(ComponentManagerImpl.kt:1162)
	at com.intellij.serviceContainer.ComponentManagerImpl.preloadService(ComponentManagerImpl.kt)
	at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$1.invokeSuspend(ComponentManagerImpl.kt:1146)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

尝试办法1:

把本地的Hyper RobotFramework Support(二者冲突)插件卸载,重新本地安装jar文件/或者搜索安装 IntelliBot #patched,重启ok。

尝试办法2:

手动安装 intellibot.jar 文件并重启GitHub - mtrubs/intellibot: IntelliJ/PyCharm plugin for Robot Automation Framework

重启后报错:

#Issue2# 配置External Tools后,“Run Case” 执行报错

...\AppData\Local\Programs\Python\Python310\Scripts\rebot.exe --loglevel TRACE:TRACE --variable country:DIY --variable env:Test --variable driver:gc --variable device_type:***
[ ERROR ] option --variable not recognized

Try --help for usage information.

下载插件,直接在marketplace里面下载即可intellibot可以使用第二张图的那个插件(这里推荐使用pycharm早一点的版本,否则可能会由于插件还未及时升级导致兼容性问题)? -->对比安装2022.1,依然存在此问题,非版本导致

正常使用了:

把配置的Run Case 和 Run Suite重新添加后,可正常执行

<think>嗯,用户想知道在Ubuntu系统上如何创建PyCharm的桌面快捷方式并正确设置文件权限。首先,我需要回忆一下相关的步骤。记得在Linux系统中,快捷方式通常存放在/usr/share/applications/目录下,所以应该在那里创建一个.desktop文件。 首先,用户可能需要通过终端进入那个目录,使用cd命令。然后,用touch命令创建文件,比如Pycharm.desktop。接下来,用文本编辑器打开这个文件,比如gedit或者nano,写入必要的配置信息,比如Name、Exec、Icon这些字段。这些信息需要指向PyCharm安装路径,特别是Exec和Icon,要确保路径正确,否则快捷方式可能无法启动。 然后是关于文件权限的问题。创建好.desktop文件后,默认可能没有执行权限,所以需要使用chmod命令修改权限。记得给文件添加可执行权限,比如chmod +x或者chmod 777,不过后者可能权限过大,但用户问题里提到了chmod,所以需要说明正确的权限设置方法。 另外,用户提到的引用里有几种方法,比如通过PyCharm自带的选项创建,或者手动创建。可能需要分步骤说明这两种方法,但用户的问题更偏向于手动创建,所以重点放在手动步骤上。 还需要注意,有时候桌面快捷方式可能需要复制到用户的桌面目录,比如~/Desktop/,但通常放在/usr/share/applications/就能在应用程序菜单中找到,然后可以拖到桌面。不过用户可能希望直接在桌面上有图标,所以可能需要说明如何复制过去,并设置权限。 另外,权限设置部分,chmod 777虽然可行,但可能不安全,应该建议更合适的权限,比如755,即用户有读写执行,组和其他有读和执行权限。不过用户引用的资料里提到了chmod 777,可能需要解释为什么使用这个,或者是否有更好的做法。 还要检查是否有语法错误,比如.desktop文件中的各个字段是否正确,比如Categories是否正确,Terminal是否为false等,这些都会影响快捷方式的表现。 总结一下,步骤应该是:1. 创建.desktop文件在正确目录;2. 编辑文件内容,确保路径正确;3. 设置文件权限;4. 可能复制到桌面并测试是否可用。同时,引用中的信息需要正确标注来源,比如引用[3]和[4]提到了创建文件和权限设置,需要正确引用。</think>以下是创建 PyCharm 桌面快捷方式并设置文件权限的详细步骤: ### 方法一:手动创建桌面快捷方式 1. **创建 .desktop 文件** 打开终端,执行以下命令: ```bash sudo touch /usr/share/applications/Pycharm.desktop # 创建快捷方式文件[^3][^4] sudo gedit /usr/share/applications/Pycharm.desktop # 使用文本编辑器编辑文件[^2] ``` 2. **编辑文件内容** 输入以下配置(需替换实际安装路径): ```ini [Desktop Entry] Name=PyCharm Exec=/path/to/pycharm/bin/pycharm.sh # PyCharm 启动脚本路径 Icon=/path/to/pycharm/bin/pycharm.png # PyCharm 图标路径 Terminal=false Type=Application Categories=Development; ``` 3. **设置文件权限** 执行命令赋予可执行权限: ```bash sudo chmod 777 /usr/share/applications/Pycharm.desktop # 开放全部权限 # 或更安全的权限设置: sudo chmod +x /usr/share/applications/Pycharm.desktop # 仅添加可执行权限 ``` ### 方法二:通过 PyCharm 自动创建 1. 启动 PyCharm 后,在欢迎界面或菜单栏选择: `Tools > Create Desktop Entry` 系统会自动生成快捷方式到 `/usr/share/applications/`[^1] 2. **验证快捷方式** 在应用程序菜单搜索 "PyCharm",找到后右键选择 `Add to Favorites` 或直接拖拽到桌面(需桌面环境支持)[^3] --- ### 关键权限说明 - `chmod 777`:开放文件的所有权限(读写执行),适用于快速配置但安全性较低 - `chmod +x`:仅添加可执行权限,建议优先使用此命令以提高安全性 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值