首页 > 解决方案 > "Indicated packet length too large" error when using remote interpreter in PyCharm

问题描述

I am setting up a remote SSH interpreter in PyCharm, but when I try to select the interpreter's location on the remote machine, I get the following error:

Indicated packet length 1952805748 too large

How can I fix this?

Screenshot of the error message

标签: pycharmsftp

解决方案


I got this error because my .bashrc file printed to stdout. .bashrc is sourced when PyCharm connects to a remote interpreter's machine over SFTP. It has to be silent, otherwise it interferes with the SFTP protocol.

The solution is to exit .bashrc early when not running interactively by putting this line at the top:

# If not running interactively, return early
[[ $- == *i* ]] || return

Further reading:


推荐阅读