Script Error: Exception: (_tp_dict_get) KeyError: splitext

Started by Grim Reaper, January 11, 2022, 09:15:22 PM

Previous topic - Next topic

Grim Reaper


Hi,

I need assistance to get a batch conversion script running. I have no Python programming knowledge.

I got a batch processing python script from a 2021 Avidemux Forum post (posted over 120 days ago) and modified it slightly to batch convert the audio in some video files from MKV to AAC(lav). Apparently, the script ran fine for the person who got assistance writing the script.

I am using AVIDEMUX 2.7.7 on a MacMini running Mojave (I will not update to a newer MacOS version because I need to run 32 bit apps)

The script runs and enables selection of the input file type and the input and output folders, loads the first video in and changes the default audio from copy to AAC(lav) but the script run dies with the following error:

TinyPy:Exception

Exception: (_tp_dict_get) KeyError: splitext
BackTrack:
File: py2bc.py, line 53
File: /Users/admin1/Documents/AVIDEMUX Batch File Conversion Script 2.py, line 56
File: /Users/admin1/Documents/AVIDEMUX Batch File Conversion Script 2.py, line 22
File: py2bc.py, line 53
File: /Users/admin1/Documents/Batch File Processing Script 1b.py, line 78
File: /Users/admin1/Documents/Batch File Processing Script 1b.py, line 23

The script is:

#PY  <- Needed to identify #
#
ui = Gui()
adm = Avidemux()
ext = "mkv"
sep = "/"
#
# Function to convert an individual video
#
def convert(filein,out):
    if not adm.loadVideo(filein):
        ui.displayError("oops","cannot load "+filein)
        return 0

    adm.videoCodec("Copy")
    if adm.audioTracksCount() > 0:
        adm.audioClearTracks()
        adm.audioAddTrack(0)
        adm.audioCodec(0, "LavAC3")
    adm.setContainer("MKV", "forceAspectRatio=False", "displayWidth=1280", "displayAspectRatio=2", "addColourInfo=False", "colMatrixCoeff=2", "colRange=0", "colTransfer=2", "colPrimaries=2")

    filename = (splitext(filein))[0]
    filename += ".mkv"
    filename = basename(filename)
    return adm.save(out + sep + filename)
#
# Main
#
# -------- select extension --------
extensions = ["avi","m2ts","mkv","mov","mp4","mpg","ts","vob","webm","wmv"]
mx = len(extensions)

menuExt = DFMenu("Select extension:")
for entry in range(0, mx):
    menuExt.addItem(extensions[entry])
dia = DialogFactory("Filter directory content")
dia.addControl(menuExt)
if not dia.show():
    return

idx = menuExt.index

if idx < 0 or idx >= mx:
    ui.displayError("Oops", "Internal error: invalid menu index")
    return

ext = extensions[idx]

# -------- select input directory --------
inputFolder = ui.dirSelect("Select source folder")
if inputFolder is None:
    ui.displayError("Oops", "No source folder selected")
    return

# -------- read content --------
list = get_folder_content(inputFolder, ext)
if list is None:
    ui.displayError("Oops", "No " + ext + " files found in \"" + inputFolder + "\"")
    return

# -------- select output directory --------
outputFolder = ui.dirSelect("Select output folder")
if outputFolder is None:
    ui.displayError("Oops", "No output folder selected")
    return

if(inputFolder == outputFolder):
    ui.displayError("Error","Output folder cannot be the same as the input one")
    return

# -------- process --------
total = 0
counter = 0

for i in list:
    total += 1
    counter += convert(i, outputFolder)

if not counter:
    ui.displayInfo("Warning", "No files converted")
    return

if counter == 1:
    ui.displayInfo("Finished", "One file out of " + str(total) + " converted")
    return

ui.displayInfo("Finished", str(counter) + " files out of " + str(total) + " converted")




eumagga0x2a

Quote from: Grim Reaper on January 11, 2022, 09:15:22 PMI am using AVIDEMUX 2.7.7 on a MacMini running Mojave

If this is a nightly from here, it is too old to have the splitext method which was added to Avidemux on Feb. 7 2021. You might try whether it works with the line containing

filename = (splitext(filein))[0]
deleted (you will get a double file extension then).

In general, only the latest release i.e. 2.8.0 is supported. It might be possible to build it from source on Mojave, but I have no means to verify. In case of problems, you would be entirely on your own.

Grim Reaper

The person who posted the original python script that was modified to work successfully used it on a Mac running Mojave and AVIDEMUX 2.7.7. I don't know why splitext isn't compatible if it ran ok for him.

I took out the line containing splitext, the following error resulted:

TinyPy:Exception

Exception: (tp_add) TypeError: ?
BackTrack:
File: py2bc.py, line 53
File: /Users/admin1/Documents/AVIDEMUX - Batch Conversion of Audio Only - 1-1c .py, line 78
File: /Users/admin1/Documents/AVIDEMUX - Batch Conversion of Audio Only - 1-1c .py, line 24

eumagga0x2a

Oops, I'm sorry, filename needs to be set, so please replace

    filename = (splitext(filein))[0]
    filename += ".mkv"
    filename = basename(filename)
    return adm.save(out + sep + filename)

with

    filename = basename(filein)
    filename += ".mkv"
    return adm.save(out + sep + filename)

Quote from: Grim Reaper on January 12, 2022, 01:50:48 AMThe person who posted the original python script that was modified to work successfully used it on a Mac running Mojave and AVIDEMUX 2.7.7

"2.7.7" means a build created after the release of 2.7.6 and including the release of 2.7.7 instantly superseded by 2.7.8, so unless the "About" dialog says "Release" and doesn't contain a git commit hash, it is a nightly from that broad time range. If the obsolete build you use has been compiled from source after February 7 2021, it has support for splitext method. Else it hasn't.

Grim Reaper

#4
Thanks for your assistance.

The script now works, mostly.

1) It doesn't ignore files that do not have the selected file extension, it puts up error warnings, one was for a text file it tried to process in the selected directory , which prevents the script from continuing until the error warnings are eliminated then the batch processing continues on to the next file in the directory. Is there a way to prevent that?

2) Because the original file name isn't parsed by splitext, the script appends ".mkv" to the full filename including the extension of the original file. Is there a way to delete the original file extension from the processed file name?

3) I would like to compile the most recent version of Avidemux to run on Mojave. I have Brew and Xcode installed on my MacMini running Mojave. Where is the most recent Avidemux code source and what is the method for compiling it?

eumagga0x2a

Quote from: Grim Reaper on January 12, 2022, 05:35:53 PM1) It doesn't ignore files that do not have the selected file extension

I cannot reproduce this issue with current Avidemux (e.g. files with names ending in .txt as well as files completely without an extension get correctly ignored), so this might be a bug fixed along the way. I guess we should not waste time on catering to limitations of obsolete versions, there are dozens of other substantial bugs fixed in the meantime.

Quote from: Grim Reaper on January 12, 2022, 05:35:53 PM3) I would like to compile the most recent version of Avidemux to run on Mojave. I have Brew and Xcode installed on my MacMini running Mojave. Where is the most recent Avidemux code source and what is the method for compiling it?

If you can get Qt (preferably Qt6) installed in Homebrew

brew install qt
then we should be fine. Build with Qt5 (qt@5 in Homebrew) was broken last time I checked ~ a month ago.

brew install cmake nasm yasm xvid x264 x265 libvpx aom opus fdk-aac lame libass mp4v2 a52dec
would install remaining build dependencies (strictly speaking, build deps are cmake, nasm, yasm and qt, but the remaining packages are desirable for a fully-featured application). If Xcode command-line tools (which include the actual compiler) are not yet installed, brew should prompt for their installation.

git clone https://github.com/mean00/avidemux2.git && cd avidemux2 && git submodule update --init --recursive
clones the Avidemux source and the translations to subdirectory avidemux2 of the current directory.

export MACOSX_DEPLOYMENT_TARGET=10.14
bash bootStrapOsx_Catalina.bash --enable-qt6

in avidemux2 directory would try to build Avidemux, packaged as a disk image, for Mojave.

Grim Reaper

#6
QT@6 is not supported by Mojave, Qt@5 is.

This doesn't work:

Admins-Mac-mini:~ admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:~ admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6
bash: bootStrapOsx_Catalina.bash: No such file or directory
Admins-Mac-mini:~ admin1$

Looks Like QT6 Installed:

/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <QtCore/qglobal.h>

#ifndef QOPERATINGSYSTEMVERSION_H
#define QOPERATINGSYSTEMVERSION_H

QT_BEGIN_NAMESPACE

class QString;
class QVersionNumber;

class Q_CORE_EXPORT QOperatingSystemVersion
{
public:
    enum OSType {
        Unknown = 0,
        Windows,
        MacOS,
        IOS,
        TvOS,
        WatchOS,
        Android
    };

    static const QOperatingSystemVersion Windows7;
    static const QOperatingSystemVersion Windows8;
    static const QOperatingSystemVersion Windows8_1;
    static const QOperatingSystemVersion Windows10;

    static const QOperatingSystemVersion OSXMavericks;
    static const QOperatingSystemVersion OSXYosemite;
    static const QOperatingSystemVersion OSXElCapitan;
    static const QOperatingSystemVersion MacOSSierra;
    static const QOperatingSystemVersion MacOSHighSierra;
    static const QOperatingSystemVersion MacOSMojave;
    static const QOperatingSystemVersion MacOSCatalina;
    static const QOperatingSystemVersion MacOSBigSur;

    static const QOperatingSystemVersion AndroidJellyBean;
    static const QOperatingSystemVersion AndroidJellyBean_MR1;
    static const QOperatingSystemVersion AndroidJellyBean_MR2;
    static const QOperatingSystemVersion AndroidKitKat;
    static const QOperatingSystemVersion AndroidLollipop;
    static const QOperatingSystemVersion AndroidLollipop_MR1;
    static const QOperatingSystemVersion AndroidMarshmallow;
    static const QOperatingSystemVersion AndroidNougat;
    static const QOperatingSystemVersion AndroidNougat_MR1;
    static const QOperatingSystemVersion AndroidOreo;

    Q_DECL_CONSTEXPR QOperatingSystemVersion(OSType osType,
                                             int vmajor, int vminor = -1, int vmicro = -1)
        : m_os(osType),
          m_major(qMax(-1, vmajor)),
          m_minor(vmajor < 0 ? -1 : qMax(-1, vminor)),
          m_micro(vmajor < 0 || vminor < 0 ? -1 : qMax(-1, vmicro))
    { }

    static QOperatingSystemVersion current();

    static Q_DECL_CONSTEXPR OSType currentType()
    {
#if defined(Q_OS_WIN)
        return Windows;
#elif defined(Q_OS_MACOS)
        return MacOS;
#elif defined(Q_OS_IOS)
        return IOS;
#elif defined(Q_OS_TVOS)
        return TvOS;
#elif defined(Q_OS_WATCHOS)
        return WatchOS;
#elif defined(Q_OS_ANDROID)
        return Android;
#else
        return Unknown;
#endif
    }

    Q_DECL_CONSTEXPR int majorVersion() const { return m_major; }
    Q_DECL_CONSTEXPR int minorVersion() const { return m_minor; }
    Q_DECL_CONSTEXPR int microVersion() const { return m_micro; }

    Q_DECL_CONSTEXPR int segmentCount() const
    { return m_micro >= 0 ? 3 : m_minor >= 0 ? 2 : m_major >= 0 ? 1 : 0; }

    bool isAnyOfType(std::initializer_list<OSType> types) const;
    Q_DECL_CONSTEXPR OSType type() const { return m_os; }
    QString name() const;

    friend bool operator>(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) > 0; }

    friend bool operator>=(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) >= 0; }

    friend bool operator<(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) < 0; }

    friend bool operator<=(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) <= 0; }

private:
    QOperatingSystemVersion() = default;
    OSType m_os;
    int m_major;
    int m_minor;
    int m_micro;

    static int compare(const QOperatingSystemVersion &v1, const QOperatingSystemVersion &v2);
};
Q_DECLARE_TYPEINFO(QOperatingSystemVersion, QT_VERSION < QT_VERSION_CHECK(6, 0, 0) ? Q_RELOCATABLE_TYPE : Q_PRIMITIVE_TYPE);

#ifndef QT_NO_DEBUG_STREAM
class QDebug;
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov);
#endif

QT_END_NAMESPACE

#endif // QOPERATINGSYSTEMVERSION_H

eumagga0x2a

Then leave --enable-qt6 out and keep fingers crossed that the bug presumably Homebrew is responsible for has been fixed.

eumagga0x2a

The build might still fail in the Qt-related part as I didn't care of Qt5 since it got broken a few months ago. I'll try to find a way to get it build then. It might take time though.

Grim Reaper

I downloaded the code files again and tried to build it, it didn't appear to complete the build, here's the output:

Admins-Mac-mini:~ admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:~ admin1$ bash bootStrapOsx_Catalina.bash
bash: bootStrapOsx_Catalina.bash: No such file or directory
Admins-Mac-mini:~ admin1$
Admins-Mac-mini:~ admin1$ git clone https://github.com/mean00/avidemux2.git && cd avidemux2 && git submodule update --init --recursive
Cloning into 'avidemux2'...
remote: Enumerating objects: 91201, done.
remote: Counting objects: 100% (5773/5773), done.
remote: Compressing objects: 100% (1751/1751), done.
remote: Total 91201 (delta 4132), reused 5512 (delta 4004), pack-reused 85428
Receiving objects: 100% (91201/91201), 488.04 MiB | 26.35 MiB/s, done.
Resolving deltas: 100% (70115/70115), done.
Checking out files: 100% (4302/4302), done.
Submodule 'i18n' (https://github.com/mean00/avidemux2_i18n.git) registered for path 'avidemux/qt4/i18n'
Cloning into '/Users/admin1/avidemux2/avidemux/qt4/i18n'...
Submodule path 'avidemux/qt4/i18n': checked out 'c954cad3b84fcfefb92c517e9c7942c7a14fe4dd'
Admins-Mac-mini:avidemux2 admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:avidemux2 admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_MAJOR '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export MAJOR=2
+ MAJOR=2
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_MINOR '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export MINOR=8
+ MINOR=8
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_P '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export PATCH=1
+ PATCH=1
+ export API_VERSION=2.8
+ API_VERSION=2.8
++ date +%y%m%d-%Hh%Mm
+ DAT=220112-19h37m
++ git log --format=oneline -1
++ head -c 11
+ gt=92b9d49b765
+ REV=220112-19h37m_92b9d49b765
+ FLAVOR=-DENABLE_QT5=True
+ qt_ext=Qt5
+ packages_ext=
+ do_core=1
+ do_cli=1
+ do_gtk=0
+ do_qt4=1
+ do_plugins=1
+ do_rebuild=0
+ debug=0
+ create_app_bundle=1
+ create_dmg=1
+ external_libass=1
+ external_liba52=1
+ external_libmad=0
+ external_libmp4v2=1
++ xcrun --sdk macosx --show-sdk-path
+ export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+ SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+ '[' x10.14 = x ']'
+ test -f /Users/admin1/myCC
+ '[' 1 '!=' 0 ']'
+ config_option=--enable-qt6
+ case "$config_option" in
+ FLAVOR=-DENABLE_QT6=True
+ qt_ext=Qt6
+ shift
+ '[' 0 '!=' 0 ']'
+ validate adm_version ''
+ opt=adm_version
+ str=
+ '[' adm_version = adm_version ']'
+ reg='[^a-zA-Z0-9_.-]'
+ msg='Only alphanumeric characters, hyphen, underscore and period are allowed for Avidemux version, aborting.'
+ [[ '' =~ [^a-zA-Z0-9_.-] ]]
+ validate output ''
+ opt=output
+ str=
+ '[' output = adm_version ']'
+ '[' output = output ']'
+ reg='[^a-zA-Z0-9\ _.-]'
+ msg='Only alphanumeric characters, space, hyphen, underscore and period are allowed for .dmg basename, aborting.'
+ [[ '' =~ [^a-zA-Z0-9\ _.-] ]]
+ config
+ setupPaths
+ '[' x1 = x1 ']'
+ export BASE_INSTALL_DIR=/
+ BASE_INSTALL_DIR=/
+ export BASE_APP=/Users/admin1/avidemux2/Avidemux2.8.app
+ BASE_APP=/Users/admin1/avidemux2/Avidemux2.8.app
+ export PREFIX=/Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ PREFIX=/Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ '[' '!' -e /Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources ']'
+ mkdir -p /Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ echo 'Build configuration :'
Build configuration :
+ echo '******************* :'
******************* :
+ echo -n 'Build type : '
Build type : + '[' x0 = x1 ']'
+ echo 'Release build'
Release build
+ '[' x = x ']'
+ export ADM_VERSION=2.8.1
+ ADM_VERSION=2.8.1
+ echo 'Avidemux version : 2.8.1'
Avidemux version : 2.8.1
+ '[' x1 '!=' x1 ']'
+ '[' x0 '!=' x1 -a x/Users/admin1/avidemux2/Avidemux2.8.app '!=' x ']'
+ rm -Rf /Users/admin1/avidemux2/Avidemux2.8.app/Contents
+ printModule 1 Core
+ value=1
+ name=Core
+ '[' x1 = x1 ']'
+ echo -e '\tCore will be built'
   Core will be built
+ printModule 0 Gtk
+ value=0
+ name=Gtk
+ '[' x0 = x1 ']'
+ echo -e '\tGtk will be skipped'
   Gtk will be skipped
+ printModule 1 Qt
+ value=1
+ name=Qt
+ '[' x1 = x1 ']'
+ echo -e '\tQt will be built'
   Qt will be built
+ printModule 1 Cli
+ value=1
+ name=Cli
+ '[' x1 = x1 ']'
+ echo -e '\tCli will be built'
   Cli will be built
+ printModule 1 Plugins
+ value=1
+ name=Plugins
+ '[' x1 = x1 ']'
+ echo -e '\tPlugins will be built'
   Plugins will be built
+ '[' x '!=' x ']'
++ which qmake
+ qmake_location=
+ '[' '' = /usr/local/bin/qmake ']'
+ '[' x '!=' x ']'
+ '[' Qt6 = Qt6 ']'
+ '[' '' '!=' /usr/local/bin/qmake ']'
+ echo -e '\n****************************************************************'

****************************************************************
+ echo -e 'When using Qt6 from Homebrew, please make sure it is linked into'
When using Qt6 from Homebrew, please make sure it is linked into
+ echo -e '/usr/local by executing\n'
/usr/local by executing

+ echo -e '\tbrew link qt6\n'
   brew link qt6

+ echo -e 'as qmake at least in Qt 6.2.0 reports a wrong path to plugins.'
as qmake at least in Qt 6.2.0 reports a wrong path to plugins.
+ echo -e '****************************************************************\n'
****************************************************************

+ exit 1



eumagga0x2a

Quote from: Grim Reaper on January 13, 2022, 01:09:49 AMAdmins-Mac-mini:avidemux2 admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6

You tried to build for Qt6, please build without --enable-qt6 option.

Grim Reaper

I tried both ways, without QT6 it ended with the following:

CMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
  CMakeLists.txt:81 (PKG_CHECK_MODULES)


-- Configuring incomplete, errors occurred!
See also "/Users/admin1/avidemux2/buildPluginsCommon/CMakeFiles/CMakeOutput.log".
+ fail cmakeZ
+ echo '** Failed at cmakeZ**'
** Failed at cmakeZ**
+ exit 1

eumagga0x2a

Quote from: Grim Reaper on January 13, 2022, 04:37:29 AMCMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found

I assumed that pkg-config will be pulled in automatically, but this seems to be wrong. Please install pkg-config manually

brew install pkg-config
and Avidemux should build fine with Qt5. I've just did it successfully on Monterey, albeit with Qt6 uninstalled, but coexistence of Qt6 and Qt5 is luckily not an issue on Mojave.

Grim Reaper

#13
I reinstalled Homebrew, etc. then tried to build the .dmg but it failed with the following (I think it can't find qmake):

++ which -s qmake
+ echo 'Error: No matching qmake executable found, aborting.'
Error: No matching qmake executable found, aborting.
+ exit 1


I will reinstall with this: brew reinstall cmake
then try again.




eumagga0x2a

Quote from: Grim Reaper on January 13, 2022, 10:22:21 PMI reinstalled Homebrew

Why, just why? The only apparently missing thing was pkg-config.

Quote from: Grim Reaper on January 13, 2022, 10:22:21 PM++ which -s qmake
+ echo 'Error: No matching qmake executable found, aborting.'
Error: No matching qmake executable found, aborting.
+ exit 1

qt (qt@5) not installed.

Quote from: Grim Reaper on January 13, 2022, 10:22:21 PMI will reinstall with this: brew reinstall cmake

??? Again, why?