Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)”

Post Reply
wuming1016
Posts: 3
Joined: Sun Mar 08, 2020 10:29 am
company / institution: Shandong University of Science and Technology
Location: Qingdao, Shandong

Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)”

Post by wuming1016 »

hi!
I am tring to use polymer v4.12 through this commond but I got these errors.

I using the command “make all” for the compilation,It shows that:
python setup.py build_ext --inplace
Traceback (most recent call last):
File "setup.py", line 29, in <module>
annotate=ANNOTATE,
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 758, in cythonize
aliases=aliases)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 664, in create_extension_list
kwds = deps.distutils_info(file, aliases, base).values
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 564, in distutils_info
return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 574, in transitive_merge
node, extract, merge, seen, {}, self.cimported_files)[0]
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 585, in transitive_merge_helper
for next in outgoing(node):
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 43, in wrapper
res = cache[args] = f(self, *args)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 513, in cimported_files
pxd_file = self.find_pxd(module, filename)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 43, in wrapper
res = cache[args] = f(self, *args)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 497, in find_pxd
pxd = self.context.find_pxd_file(relative, None)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 239, in find_pxd_file
pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 280, in search_include_directories
tuple(self.include_directories), qualified_name, suffix, pos, include, sys_path)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 29, in wrapper
res = cache[args] = f(*args)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 119, in search_include_directories
path = os.path.join(dir, dotted_filename)
File "/usr/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)
makefile:9: recipe for target 'main' failed
make: *** [main] Error 1

It is hard for me to understand what to do after that.
So I tried to run these commands:
root@ming:/home/ming/Desktop/polymer-v4.12# python setup.py
but it throw the same error as above.
Traceback (most recent call last):
File "setup.py", line 29, in <module>
annotate=ANNOTATE,
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 758, in cythonize
aliases=aliases)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 664, in create_extension_list
kwds = deps.distutils_info(file, aliases, base).values
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 564, in distutils_info
return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 574, in transitive_merge
node, extract, merge, seen, {}, self.cimported_files)[0]
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 585, in transitive_merge_helper
for next in outgoing(node):
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 43, in wrapper
res = cache[args] = f(self, *args)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 513, in cimported_files
pxd_file = self.find_pxd(module, filename)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 43, in wrapper
res = cache[args] = f(self, *args)
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 497, in find_pxd
pxd = self.context.find_pxd_file(relative, None)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 239, in find_pxd_file
pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 280, in search_include_directories
tuple(self.include_directories), qualified_name, suffix, pos, include, sys_path)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 29, in wrapper
res = cache[args] = f(*args)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 119, in search_include_directories
path = os.path.join(dir, dotted_filename)
File "/usr/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)

Can someone tell me how to solve it?
Thanks for your help in advance!
Best regards,
ming
User avatar
fsteinmetz
Site Admin
Posts: 74
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128

Post by fsteinmetz »

Dear Ming,

Your problem seems to be related to some non-ascii file path in your installation. But I don't know which one, since you mention "root@ming:/home/ming/Desktop/polymer-v4.12"
Non-ascii file paths are a typical issue with python 2. I recommend you use python 3, which can easily be installed through the anaconda distribution.
I hope this helps,
Cheers,
François
wuming1016
Posts: 3
Joined: Sun Mar 08, 2020 10:29 am
company / institution: Shandong University of Science and Technology
Location: Qingdao, Shandong

Re: Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128

Post by wuming1016 »

Dear François,

Thanks so much for solving these problem.
You are right, some files are not ordinary ASCII characters. I converted the corresponding characters to unicode type. After running the software, there were no problems.

Thanks a lot in advance for your help,
Best regards
ming
wuming1016
Posts: 3
Joined: Sun Mar 08, 2020 10:29 am
company / institution: Shandong University of Science and Technology
Location: Qingdao, Shandong

Re: Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128

Post by wuming1016 »

Dear François,
Now I have some other questions.
When I ran the software, it got some other errors.
I will attach the code:
root@ming:/home/wuming/Desktop/polymer-v4.12# ./polymer_cli.py MER_FRS_1PNUPA20090825_201550_000003942082_00014_39146_1104.N1 20090825.hdf
Starting processing at 2020-03-14 14:52:55.443267
Opened "MER_FRS_1PNUPA20090825_201550_000003942082_00014_39146_1104.N1", (4481x8961)
Initializing output file "20090825.hdf"
Processing block: size (100, 4481), offset (0, 0)
/home/ming/Desktop/polymer-v4.12/polymer/luts.py:407: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
shp_res = np.zeros(1).reshape([1]*self.ndim)[index0].shape
Processing block: size (100, 4481), offset (100, 0)
killed

And,There are many temporary documents in the folder
No problem before running,How can I solve it, please give me some ideas

Best regards
ming
User avatar
fsteinmetz
Site Admin
Posts: 74
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Polymer 4.12 throw“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128

Post by fsteinmetz »

Well, it seems that the process has been killed by the kernel for some reason.
Since it was killed, the temporary files are not cleaned up. You can try to use the command 'dmesg' to see the kernel log and get more insight.
Cheers,
François
Post Reply