Nono.MA

NOVEMBER 18, 2021

I found this approach to install unzip on SageMaker Studio with yum in the Terminal.

sudo yum install -y unzip

Now you can use unzip --version to verify unzip is installed, and unzip file.zip to extract the contents of a compressed file.


An alternative approach which didn't work for me

Run the following command (note the bang!) inside of a Jupyter notebook or Python console in SageMaker Studio to install unzip.

!conda install -y -c conda-forge unzip

After running that command, I don't seem to be able to run unzip in Terminal yet.

OCTOBER 18, 2021

I found the following error while trying to execute PORT=4444 node ./bin/server.js on my Node.js application.

SyntaxError: Cannot use import statement outside a module

I solved it by adding the following into the package.json file of my NPM project.

  "type": "module",

SEPTEMBER 29, 2021

Nesting <a> HTML elements is forbidden. Here's an example:

<a href="https://nono.ma">
  Go to my website, or to my
  <a href="https://nono.ma/about">
    about page
  </a>.
</a>

A link to the about page is nested inside of a link to the root of this site.

SEPTEMBER 21, 2021

If you're trying to remove a directory using the os.rmdir function, but it contains other files, you'll probably hit the following error.

OSError: [Errno 66] Directory not empty:

You can ignore this error by using the shutil library instead of os.

import shutil
shutil.rmtree(path)

Note that Python won't prompt you to confirm this deletion action and this may lead to deleting files by mistake.

MAY 17, 2021

dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
dyld: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicuio.68.dylib
  Referenced from: /opt/homebrew/bin/php
  Reason: image not found
zsh: abort      composer

Install (or update) the Xcode developer tools.

xcode-select --install

Reinstall icu4c.

brew reinstall icu4c

Make sure no errors prevent Homebrew from installing icu4c properly. For instance, I had to remove a few php folders and re-run the brew reinstall icu4c command.

sudo rm -rf /opt/homebrew/Cellar/php@7.4/7.4.15
sudo rm -rf /opt/homebrew/Cellar/php/8.0.2

MAY 1, 2021

When you use two-factor authentication to sign in to your Gmail account (or to "Sign in with Google") you access your account with your email, password, and a verification code generated by Google Authenticator or other authenticator apps (such as Duo).

You might get an error like the one that follows when trying to sign in to Gmail with your Google password.

Authentication failed. Please check your username/password and Less Secure Apps access for mail@example.com.
Server returned error: "534-5.7.9 Application-specific password required. Learn more at 534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor l25sm248619lfe.188 - gsmtp , code: 534"

When the service you're trying to use your Gmail account with doesn't allow you to "Sign in with Google," you need to create an app-specific password as detailed in the support Url provided by the error message.

Create a Google App Password

This app password

  • Go to your Google account
  • Security
  • Sign in to Google
  • App passwords
  • Choose the service type — e.g., Mail, Calendar, Contacts, YouTube, or Other (custom)
  • Choose the device type — e.g., iPhone, iPad, Mac, Windows, etc.
  • Generate

You'll get an app-specific password like this one — dbkdwckcplvgaktc — that will let you log in to the authorized service with your email and this password.

In my case, I use this password to be able to "Send as" from Gmail from an email address that has two-factor authentication turned on.

APRIL 20, 2021

cd /path/to/repo.git
sudo chgrp -R {groupname} .
sudo chmod -R g+rwX .
find . -type d -exec chmod g+s '{}' +

Source

JANUARY 13, 2021

I got this error while trying to pip3 install tensorflow. I tried python3 -m pip install tensorflow as well — it didn't work.

ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow

As was my case, the reason for this error might be that you are using pip from a Python version not yet supported by any version of TensorFlow. I was running Python 3.9 and TensorFlow only had compatibility up to Python 3.8. By creating a new environment with Python 3.8 (or reverting the current environment to use 3.8) I could pip3 install tensorflow successfully.

Want to see older publications? Visit the archive.

Listen to Getting Simple .