That turned out to be the problem. Some people on the project for got
the if name equals main bit.

For future reference, using the "-N" option causes sphinx-build to
print a line for each source file that its reading so that you can
tell which file it bombed on.

I wish I had tried it before I checked each file manually.

Thanks for the help,
ntroutman



On Aug 5, 8:25 am, Georg Brandl <ge...@python.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 04.08.2010 23:56, schrieb ntroutman:
>
>
>
>
>
> > I've been working on a building using sphinx to document a project of
> > mine. I recently started getting the following error:
>
> > $ sphinx-build -a -E -b html source build/html
> > Running Sphinx v1.0.1
> > building [html]: all source files
> > updating environment: 94 added, 0 changed, 0 removed
> > usage: sphinx-build [-h] [-xml] [-pkl] [-typ] [-chk] [-dir
> > DIR]
> > sphinx-build: error: unrecognized arguments: -a -E -b html source
> > build/html
>
> > I tried a really simple test set of rst files and they work, so my
> > install of sphinx is good. I assume one my rst files is bad in someway
> > but without an error i'm not sure which one and renaming 94 files by
> > hand to check each one doesn't seem like fun.
>
> > Does anyone have any idea what might be causing this error?
>
> Hi,
>
> it seems that you have a module that is imported by sphinx (probably
> because of autodoc), and that unconditionally considers itself a
> script (that's where the arguments come from -- they are definitely
> not Sphinx arguments).  This is bad and indicates a problem:
>
> * Either the script is imported instead of a module with the same
>   name, then something is wrong with your sys.path setting
>
> * Or the script is meant to be imported, then its "script" parts
>   need to be inside an
>
>    if __name__ == '__main__':
>
>   block.
>
> (I understand it looks like a Sphinx problem, because "sphinx-build"
> is mentioned, but that is simply sys.argv[0] inserted by the script.)
>
> cheers,
> Georg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.16 (GNU/Linux)
>
> iEYEARECAAYFAkxau9EACgkQN9GcIYhpnLCvEgCfT2eJALpKl9v5pA3J07Gwo3rs
> 9lEAoJL9rqoBUOoqY2SakFFonMMhySbI
> =yIDL
> -----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to