Tuesday, 4 February 2025

How to Fix Run Error "DisplayConnectionError: b'Authorization required, but no authorization protocol specified\n'"

 This is an error that is common on machines that are running a Linux OS, notably if you have had a break from developer work.

While my machine is running Linux, I use Spyder for my dev-ops environment, although the error will occur in other developer platforms.  Simply, when test-running a program, it fails to launch, and the log reports a "xlib error displayconnectionerror cant connect to display" error.

The issue is within neither the developer platform or your code, but in the supporting libraries within the Linux distribution of Python, and has an easy update fix.

Open a terminal window (CTRL-Alt-T), and enter the command

   xhost +

Let that run, and then enter the command

        sudo apt-get install python3-tk python3-dev

Close the terminal, re-open your developer platform, and run your code.


Using Python to Write a Dataframe to a Google Spreadsheet

 I had all sort of issues with this one.  Multiple searches, and trying many variations of the Google API access code modules to find one th...