I have tried performing a completely fresh install of the latest version of octoprint with no change in behaviour. Checked SSID and password are correct.
Can you SSH into your octopi system? If so, what is the output of cat /etc/resolv.conf?
For more DNS utilities, you can install sudo apt-get install dnsutils (I had to sudo apt-get update and sudo apt-get upgrade before dnsutils would install).
More likely the DNS server(s) aren't being sent. I say this because the screenshot in the original post shows the 1.1.1.1 server is reachable (so gateway is correct) but name cannot be resolved. With the output of /etc/resolv.conf we can determine if nothing is being sent or if something OctoPrint can't use is being sent.
same issue here - but looking to resolv.conf on the octoprint server (not octopi!) I can find three lines (apologize if I obfuscate the original addresses)
# Generated by NetworkManager
search fritz.box
nameserver <my local DNS server here - IPv4 address>
nameserver <my local DNS server here - IPv6 address>
Additional information: as I am running klipper, Octoprint run on port 5000, so I am not sure if this is relevant.
Octoprint system info below. Where do I continue to look for issues?
This is not an OctoPrint problem (and apparently not an OctoPi problem either). Without more information there's not much we can do. BTW, there is no need to obfuscate local IP addresses.
Try a Google search for "linux have IP address but not internet" and see if one of those links helps you troubleshoot the issue.
Since you are not running OctoPi, what flavor of Linux are you running on what hardware?
Since your initial dump of resolv.conf showed an obfuscated IPV6 address, I'd suggest we disable IPV6. You will have to search for instructions for your operating system.
If turning off IPV6 doesn't change the symptoms, a couple of commands that might provide some useful data. ifconfig, route, ping 8.8.8.8, ping dns.google.com, traceroute dns.google.com, ping octoprint.org, traceroute octoprint.org.
Finally, here is a link to some Python Network examples.