SPF-OST / pytrnsys_gui

Graphical user interface for pytrnsys
https://pytrnsys.readthedocs.io
GNU Lesser General Public License v3.0
3 stars 4 forks source link

The json you are opening does not have a proper project folder environment. #495

Open ahobeost opened 7 months ago

ahobeost commented 7 months ago

Some users encounter the following when opening an old json file. image

The main culprit for this is copy/pasting of existing projects by hand. This is best left up to pytrnsys (copy to new folder): image

However, for users to recover such a broken GUI diagram, the following steps should fix the problem.

  1. The json name needs to be the same as the folder it is in (\simulation\dummy.json -> \simulation\simulation.json)
  2. Then, the diagramName and projectFolder need to be set accordingly: image
zuckerruebe commented 7 months ago

Is this issue mainly there to document the work-around? Or would you like to see something particular be done? Medium-term, we could maybe get rid of the restriction on the name of the project json <project-name>/<project-name>.json - I can't think of any good reason for it off the top of my head. Also - but that's really a different issue - I'd like to change the .json extension of our project JSON files to something more specific, say .pytrngui, or something. I think that would just be cleaner overall. Also, I sometimes misclick on the placeholders JSON file when I really want to open the project JSON file.

ahobeost commented 7 months ago

The description of the workaround was the first priority. Ultimately, I would propose a decoupling of such files from the folders they come in. As I cannot think of a reason for this restriction myself, I was thinking it might have been implemented as a reaction to a past bug/issue.