I have tried many ways to convert UTM to lon/lat, and getting always the same weird result.
Getting UTM and lon/lat for a point using GoogleEarth:
from pyproj import Proj
lon = -40.729124
lat = -20.967705
z = 24
l = 'k'
posx = 320235.13
posy = 7680455.66
myProj = Proj("+proj=utm +zone=24K, +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
clon, clat = myProj(posx, posy, inverse=True)
print(clon, clat)
I get...
-43.534213641680765 69.17434868536577
What do I missing?
pyproj.exceptions.CRSError: Invalid projection: +proj=utm +zone=24K, +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs +type=crs: (Internal Proj Error: proj_create: Error 1027 (Invalid value for an argument): utm: Invalid value for zone)
. Fix the syntax as advised in the answer by @sutan.