Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panzer won't start install due to Unicode error #12

Closed
halloleo opened this issue Jun 17, 2015 · 10 comments
Closed

panzer won't start install due to Unicode error #12

halloleo opened this issue Jun 17, 2015 · 10 comments

Comments

@halloleo
Copy link

After

git clone https://github.com/msprev/panzer
cd panzer
python3 setup.py install

I get

Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    readme_text = file.read()
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 127: ordinal not in range(128)

Any setting in the python3 package system needed?

Many thanks,
Leo

@halloleo halloleo changed the title panzer won't install panzer won't start install due to Unicode error Jun 17, 2015
msprev pushed a commit that referenced this issue Jun 17, 2015
@msprev
Copy link
Owner

msprev commented Jun 17, 2015

Thanks for catching this! I believe it was a unicode error in setup.py. You probably have your python3 default encoding set to something other than 'utf8'. I've pushed a fix now. It should install if you pull the latest version. Let me know if it doesn't.

@msprev msprev closed this as completed Jun 17, 2015
@halloleo
Copy link
Author

Mmmmh. I did:

$ git pull
remote: Counting objects: 3, done.        
remote: Compressing objects: 100% (3/3), done.        
remote: Total 3 (delta 2), reused 1 (delta 0), pack-reused 0        
Unpacking objects: 100% (3/3), done.
From https://github.com/msprev/panzer
   bf9e5a4..21429b9  master     -> origin/master
Updating bf9e5a4..21429b9
Fast-forward
 setup.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

and still got the unicode error:

$ python3 setup.py install --force
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    readme_text = file.read()
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 127: ordinal not in range(128)

@halloleo
Copy link
Author

Where do I check what's my python3 default coding?

@msprev
Copy link
Owner

msprev commented Jun 17, 2015

Strange... What do you get if you type this into the terminal prompt?

python3
import sys
sys.getdefaultencoding()

@msprev msprev reopened this Jun 17, 2015
msprev pushed a commit that referenced this issue Jun 17, 2015
@msprev
Copy link
Owner

msprev commented Jun 17, 2015

I've pushed another change that should fix it. I believe the encoding are all being correctly handled in setup.py. Please give it a try and let me know if it doesn't work.

@msprev msprev closed this as completed Jun 17, 2015
@halloleo
Copy link
Author

For sys.getdefaultencoding() I get:

utf-8

The install goes with the newest commit further, but still gives an error for me:

$ python3 setup.py install --force
running install
running bdist_egg
running egg_info
creating panzer.egg-info
writing entry points to panzer.egg-info/entry_points.txt
writing top-level names to panzer.egg-info/top_level.txt
writing dependency_links to panzer.egg-info/dependency_links.txt
writing panzer.egg-info/PKG-INFO
Traceback (most recent call last):
  File "setup.py", line 36, in <module>
    zip_safe=False)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/lib/python3.4/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
    self.run_command("egg_info")
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 173, in run
    writer(self, ep.name, os.path.join(self.egg_info, ep.name))
  File "/usr/local/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 388, in write_pkg_info
    metadata.write_pkg_info(cmd.egg_info)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 1129, in write_pkg_file
    long_desc = rfc822_escape(self.get_long_description())
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/util.py", line 470, in rfc822_escape
    lines = header.split('\n')
TypeError: 'str' does not support the buffer interface
$

@halloleo
Copy link
Author

Sorry to be a pain with this! But I like the idea of panzer, so I really would like to try it...

@msprev
Copy link
Owner

msprev commented Jun 17, 2015

Thanks. My 2 previous commits had clobbered each other and caused it to erroneously try to do a double utf8 decoding. I've just pushed a fix, that should -- fingers crossed -- resolve your problem.

@halloleo
Copy link
Author

Thanks heaps. Works now.

@msprev
Copy link
Owner

msprev commented Jun 18, 2015

Great! Thank you for catching this bug for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants