O'Reilly Forums: Chapter2, P.41. - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter2, P.41.

#1 User is offline   ZipStar 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 06-November 12

Posted 06 November 2012 - 11:52 AM

Hi! Thanks for any attention to this problem.

I'm working through HFP page 48, and attempting to register with PyPI on command line. I changed the name of my module to jyNester (my initials in front) because of the error received when using the nester name.
When I type:
C:\Head First Python\jyNester>python setup.py register I receive the following messages, ending with a BasicInterpolationSyntax error. It seems there's something wrong with my setup.py, but I'm not able to find it:

from distutils import setup

setup(
    name              =     'jyNester',
    version           =     '1.0.0',
    py_modules   =     ['jyNester'],
    author            =     'John Yaist',
    author_email =     'johnnyturbo2003@yahoo.com',
    url                   =     'http://www.arcgis.com/home/content.html',
    description    =      'A simple printer of nested lists',
    )
 


Any ideas on how to fix this?:

running register
Traceback (most recent call last):
File "setup.py", line 10, in <module>
description = 'A simple printer of nested lists',
File "C:\Python32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python32\lib\distutils\dist.py", line 917, in run_commands
self.run_command(cmd)
File "C:\Python32\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python32\lib\distutils\command\register.py", line 45, in run
self._set_config()
File "C:\Python32\lib\distutils\command\register.py", line 71, in _set_config
config = self._read_pypirc()
File "C:\Python32\lib\distutils\config.py", line 92, in _read_pypirc
current[key] = config.get(server, key)
File "C:\Python32\lib\configparser.py", line 790, in get
d)
File "C:\Python32\lib\configparser.py", line 391, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "C:\Python32\lib\configparser.py", line 440, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%'
0

#2 User is offline   paulbarry 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 257
  • Joined: 20-August 09

Posted 07 November 2012 - 06:01 AM

First line should read:

from distutils.core import setup


as per page 40 in the book. That should fix it.

Also: see this page, especially the bit under "Important PyPI Information".

--Paul.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users