I am fairly new to programming, so please bear with me.
While I was installing some required packages for a module that I'm using, I wasn't able to install python-stdnum==1.8
.
I got the following error message:
File "C:\Users\59996\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 967: character maps to <undefined>
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Is there anything I can do to still be able to install the package?
Any help would be greatly appreciated. Thanks in advance!
If it's for the Odoo 14 install on Windows, the issue is in the "requirements.txt"
Change "python-stdnum==1.8" to "python-stdnum==1.8.1" (even if the answer of Federico Baù is working by the way)
then another issue will appear so change "psutil==5.6.6" to "psutil==5.6.7" still in the "requirements.txt"
source: https://github.com/odoo/odoo/issues/62919
Best regards
I ran to the same problem while installing Odoo Dependencies in Windows, but after some tacke I found a solution.
It's a old bug with stdnum 1.8
--> stdnum 1.8 installation fails on windows.
Go to arthurdejong.org/python-stdnum/ and find python-stdnum-1.8.tar.gz
Download the Zip in a folder, rename it from python-stdnum-1.8.tar.gz
to python-stdnum-1.8.tar_.gz
(Just to avoid name collision).
Then create the following Python Script (in the same directory):
import tarfile
def open_tarfile_function(tarfile_file_name):
open_tarfile=tarfile.open("python-stdnum-1.8.tar_.gz")
open_tarfile.extractall(path='stdnum')
open_tarfile.close()
open_tarfile_function('data.tgz')
setup.py
, go to line 37 and modify from this:with open(os.path.join(base_dir, 'README'), 'r') as fp:
long_description = fp.read()
To this:
with open(os.path.join(base_dir, 'README'), 'rb') as fp:
long_description = fp.read().decode('utf-8')
Save it.
import tarfile
import os.path
def make_tarfile(output_filename, source_dir):
with tarfile.open(output_filename, "w:gz") as tar:
tar.add(source_dir, arcname=os.path.sep)
output_filename = "python-stdnum-1.8.tar.gz"
source_dir = "stdnum\python-stdnum-1.8"
make_tarfile(output_filename, source_dir)
This will create file python-stdnum-1.8.tar.gz
copy the Absolute Path
Go to your Python Environment and run:
pip install D:\Odoo\Odoo_instance_one\python-stdnum-1.8.tar.gz
Obviously replace the Absolute Path with your absolute path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With