PBR

pbr running in git context when it shouldn't

Bug #1265622 reported by Andreas Jaeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Won't Fix
Undecided
Unassigned

Bug Description

Checking out current openstack-manuals package (git head commit is 5b00b10e463b74c8826b18c658eb75782ddabe30), I run "tox" on it - and it fails with:
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 6938: ordinal not in range(128)

The problem seems to be that pbr runs in git context and includes the files from the openstack-manual while generating the MANIFEST file. Some of the files in openstack-manual contain ndashes in the filename.

Note: I'm pushing to rename these files in openstack-manuals, so if you want to test this, use an older tree...

The error message is:

    Installed /home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/build/openstack-doc-tools/pbr-0.5.23-py2.7.egg
    [pbr] Processing SOURCES.txt
    warning: LocalManifestMaker: standard file '-c' not found

    [pbr] In git context, generating filelist from git
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no files found matching '*' under directory 'doc'
    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files found matching '.gitreview'
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/build/openstack-doc-tools/setup.py", line 22, in <module>
        pbr=True)
      File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "<string>", line 14, in replacement_run
      File "/home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/build/openstack-doc-tools/pbr-0.5.23-py2.7.egg/pbr/packaging.py", line 575, in find_sources
        mm.run()
      File "/home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 333, in run
        self.write_manifest()
      File "/home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 356, in write_manifest
        "writing manifest file '%s'" % self.manifest)
      File "/usr/lib64/python2.7/distutils/cmd.py", line 349, in execute
        util.execute(func, args, msg, dry_run=self.dry_run)
      File "/usr/lib64/python2.7/distutils/util.py", line 324, in execute
        func(*args)
      File "/home/aj/Software/vcs/OpenStack/openstack-manuals/.tox/checkbuild/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 391, in write_file
        f.write(contents)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 6938: ordinal not in range(128)
    Complete output from command python setup.py egg_info:

Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

btw. filed thanks to debugging from the #openstack-infra team on IRC

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

I'm not sure this is a pbr bug. It looks like we correctly get the filenames and pass them to setuptools, which is then trying to write them to an ASCII file instead of a UTF-8 file.

The version of pbr referenced is quite old, as well, and new versions of pbr and setuptools have been released since the bug was open. If this is still a problem, please reopen the ticket.

Changed in pbr:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.