Menu

#41 pluginloader and docset with Python >2.0

defect
closed-invalid
None
5
2002-08-22
2001-12-05
No

I have several problems with HappyDoc under Python
>2.0, that I didn't have when using Python 2.0.

On Intel-Linux machine I get the following errors:

thielema@galois:~/fsrat/public_html/protokolle>python
-V
Python 2.1
thielema@galois:~/fsrat/public_html/protokolle>happydoc

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

--- Plugin Module Error ---
Traceback (most recent call last):
File "/home/thielema/happypythondoc/pluginloader.py",
line 116, in __init__
_module = __import__( _import_name )
ValueError: Empty module name
---------------------------

Traceback (most recent call last):
File "/home/thielema/happypythondoc/happydoc", line
61, in ?
HappyDoc().run()
File
"/home/thielema/happypythondoc/CommandLineApp.py", line
123, in __init__
self.appInit()
File
"/home/thielema/happypythondoc/happydoc_class.py", line
140, in appInit
self.set_docset_type('multifile_docset')
File
"/home/thielema/happypythondoc/happydoc_class.py", line
191, in set_docset_type
docset_type)
ValueError: ('docset_type must be one of []',
'multifile_docset')

I have found out that the pluginloader module gets a
list of *.pyc files instead of *.py files and thus the
string slicing [:-3] fails.

----------------

Under a Python installed on SUN-Solaris machines,
I get only the docset error:

thielema@germain:~/fsrat/public_html/protokolle>python
-V
Python 2.2b1
thielema@germain:~/fsrat/public_html/protokolle>happydoc
Traceback (most recent call last):
File "/home/thielema/happypythondoc/happydoc", line
61, in ?
HappyDoc().run()
File
"/home/thielema/happypythondoc/CommandLineApp.py", line
123, in __init__
self.appInit()
File
"/home/thielema/happypythondoc/happydoc_class.py", line
140, in appInit
self.set_docset_type('multifile_docset')
File
"/home/thielema/happypythondoc/happydoc_class.py", line
191, in set_docset_type
docset_type)
ValueError: ('docset_type must be one of []',
'multifile_docset')

Discussion

  • Doug Hellmann

    Doug Hellmann - 2002-01-19

    Logged In: YES
    user_id=34486

    I haven't been able to reproduce this problem with Python 2.1.1 (used
    for development). I'm currently updating to Python 2.2 and will verify
    that the problem does not occur there.

    Which version of HappyDoc are
    you using?

    Doug

     
  • Doug Hellmann

    Doug Hellmann - 2002-01-19
    • assigned_to: nobody --> doughellmann
     
  • Doug Hellmann

    Doug Hellmann - 2002-02-03

    Logged In: YES
    user_id=34486

    I have not seen this problem with Python 2.2 under Linux or Win32. Can you
    still reproduce the problem?

    Doug

     
  • Amiga Lemming

    Amiga Lemming - 2002-02-05

    Logged In: YES
    user_id=197994

    I used HappyDoc_r1_6_1.tar.gz and the error is still
    reproducable.

    I tried to install newer versions of HappyDoc (2.0 or
    2.0.1),
    but they fail, because there is only a directory named
    'happydoclib' and the programs seem to import it like a
    module.
    Is this a feature of newer versions of Python?

    thielema@galois:~/happypythondoc2.0>python -V
    Python 2.1
    thielema@galois:~/happypythondoc2.0>python ./setup.py
    install
    Traceback (most recent call last):
    File "./setup.py", line 64, in ?
    from happydoclib.cvsversion import cvsProductVersion
    ImportError: No module named happydoclib.cvsversion
    thielema@galois:~/happypythondoc2.0>python ./happydoc
    Traceback (most recent call last):
    File "./happydoc", line 57, in ?
    from happydoclib import HappyDoc
    ImportError: No module named happydoclib

     
  • Doug Hellmann

    Doug Hellmann - 2002-02-05

    Logged In: YES
    user_id=34486

    The problem with the setup script probably has to do with
    the fact that sys.path does not include the current
    directory by default. I'll work on the setup script to fix
    that.

    Using a directory like a module is a fairly old feature of
    Python. I think it was introduced in 1.5, but I'm not sure.
    If there is an __init__.py file in the directory, then when
    you import the directory you get a module with the contents
    of the __init__.py module. You can have other modules in
    the directory, which makes for a clean way to hide code and
    simplify the interface to a library without putting all of
    your library in one file.

    Doug

     
  • Amiga Lemming

    Amiga Lemming - 2002-02-05

    Logged In: YES
    user_id=197994

    I tested to get it running by setting $PYTHONPATH to several
    directories. But it didn't work.

    Unfortunately there is no '__init__.py' file in
    'happydoclib' itself, but only in its sub-directory
    'formatter'.

     
  • Doug Hellmann

    Doug Hellmann - 2002-02-05

    Logged In: YES
    user_id=34486

    The problem with the setup script probably has to do with
    the fact that sys.path does not include the current
    directory by default. If you grab the latest setup.py
    script from CVS, you should be able to get through the
    installation.

    Using a directory like a module is a fairly old feature of
    Python. I think it was introduced in 1.5, but I'm not sure.
    If there is an __init__.py file in the directory, then when
    you import the directory you get a module with the contents
    of the __init__.py module. You can have other modules in
    the directory, which makes for a clean way to hide code and
    simplify the interface to a library without putting all of
    your library in one file.

    Doug

     
  • Doug Hellmann

    Doug Hellmann - 2002-02-05

    Logged In: YES
    user_id=34486

    It sounds like you have a bad tarball. I just posted a new
    one today that includes some other win32 fixes, so you might
    want to grab that anyway.

    I'll experiment with this further the next time I have a
    chance to boot into windows. That might be a day or two,
    though, based on how this week is shaping up. :-)

    Doug

     
  • Doug Hellmann

    Doug Hellmann - 2002-08-22

    Logged In: YES
    user_id=34486

    I still have not been able to reproduce this on any of the
    systems at home or work. Please re-open the bug if you
    continue hvaing trouble.

     
  • Doug Hellmann

    Doug Hellmann - 2002-08-22
    • status: open --> closed-invalid
     

Log in to post a comment.