You can use this piece of code, to try different encodings when opening the shapefile. The code also searches for a .cpg file, which holds the encoding for a shapefile.
import os
import shapefile
# List with different encodings
encodings = ['utf-8', 'ISO8859-1']
# Try to add the encoding from the .cpg file
cpg_path = shp_path.replace('.shp', '.cpg')
if os.path.exists(cpg_path):
with open(cpg_path) as cpg_file:
for l in cpg_file:
encodings.insert(0, str(l))
# Try to open the shapefile with the encodings from the list
for e in encodings:
try:
with shapefile.Reader(shp_path, encoding=e) as shp:
print(f'Successfully opened the shapefile with encoding: {e}')
except UnicodeDecodeError:
print(f'Error when opening the shapefile with encoding: {e}')