eric ide

Issue304

Classification
Title: eric6 19.9 installation fails on macos
Type: crash Product: eric6
Process
Priority: high    
Status: closed Resolution: fixed
Superseder: Nosy List: Qb, detlev
Assigned to: Keywords:

Created on 2019-09-08.22:18:34 by Qb, last changed by detlev.

Messages (2.0)
msg1134 (view) Author: detlev Date: 2019-09-09.16:54:37
Thanks for providing the fix together with the issue report. It will be included 
in the next release and is available through the source code repository already.
msg1133 (view) Author: Qb Date: 2019-09-08.22:18:34
Hi:

When I try to upgrade Eric 6 from 19.8 to 19.9 on my macos, this exception is raised:


Traceback (most recent call last):
  File "./install.py", line 2135, in <module>
    main(sys.argv)
  File "./install.py", line 2105, in main
    res = installEric()
  File "./install.py", line 1010, in installEric
    createMacAppBundle(cfg['ericDir'])
  File "./install.py", line 1226, in createMacAppBundle
    os.symlink(macPythonExe, starter)
FileNotFoundError: [Errno 2] No such file or directory: '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python' -> '/Applications/eric6.app/Contents/MacOS/eric'


After debugging install.py, I have found a bug in line 1212 to 1214:


    for directory in directories:
        if not os.path.exists(directory):
            os.makedirs(directory)

This loop is checking the existence of the keys in dictionary `directories` instead of checking the paths (values) in this dictionary. 

I think that it should be:

    for directory in directories.values():
        if not os.path.exists(directory):
            os.makedirs(directory)

or: 

    for directory in directories:
        if not os.path.exists(directories[directory]):
            os.makedirs(directories[directory])

I have checked the first alternative (with `directories.values()`) and works on my system.

I hope this will be useful for you. Thanks.
History
Date User Action Args
2019-09-09 16:54:37detlevsetstatus: open -> closed
resolution: fixed
messages: + msg1134
message_count: 1.0 -> 2.0
nosy: + detlev
2019-09-09 16:53:27detlevsetstatus: new -> open
2019-09-08 22:18:34Qbcreate