Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm: The project at ... uses a non-standard layout and cannot be attached to this project

Tags:

pycharm

I have the latest version of PyCharm installed (2017.1). Everything works well except when I try to open two projects in the same window. I get this popup after hitting OK in the Open Project dialogue (which gives you the option to Open in a new window or Open in current window).

enter image description here

I tried the fix mentioned here (which is really stupid anyway). Also tried throwing a *.iml file in the ./idea directory, but it gave me this:

5/4/17
5:11 PM Load Settings
                Cannot load settings from file '/home/brandon/Downloads/chalice/.idea/chalice.iml': content truncated
                File content will be recreated

Again, it doesn't matter which project I want to open, so replace chalice with *. Opening single *.py files is fine, but I can't open projects.

Anyone have a solution so I can get back to writing Python? :D


EDIT: So now I've downloaded the latest version PyCharm and re-installed it. Now I can't even create a new project without this popup coming up.

What's going on here ???

like image 657
bjd2385 Avatar asked May 04 '17 21:05

bjd2385


4 Answers

As mentioned by norok2, for Pycharm 2019.1, first open the project in a new window.

Afterward, try to attach it to the existing window.

like image 128
Haidar Zeineddine Avatar answered Sep 23 '22 15:09

Haidar Zeineddine


  • Delete the .idea folder from the second project you want to add (if it exists)

  • Close the first project in current window (if opened)

  • Create a New Project from existing scripts for the second project that you want to add (creates a new .idea folder)

  • Open the first project and attache to it the second project

like image 21
DrGabrielA81 Avatar answered Sep 22 '22 15:09

DrGabrielA81


PyCharm support suggested that I comment out the ProjectModuleManager component from ~/.PyCharm2017.1/config/options/project.default.xml. After restarting PyCharm (2017.1.3) and removing any .idea/ directories from the modules I wanted to open, I no longer had this issue.

like image 43
bjd2385 Avatar answered Sep 22 '22 15:09

bjd2385


I created a new project in PyCharm and had this problem. Following this solution, I found the new project did not have a .iml file in the new project's .idea folder. I copied and pasted the .iml from another project and just changed the .iml file name to match the project. Problem solved.

like image 34
broccoli2000 Avatar answered Sep 24 '22 15:09

broccoli2000