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

1.13.0 Release exits with missing module import error #59

Closed
wummel opened this issue Dec 21, 2012 · 3 comments
Closed

1.13.0 Release exits with missing module import error #59

wummel opened this issue Dec 21, 2012 · 3 comments

Comments

@wummel
Copy link
Owner

wummel commented Dec 21, 2012

Converted from SourceForge issue 1020819, submitted by edentz

Thanks for the response to my previous bug reports. I was going to
test out the changes but I ran into another bug. I tested on both
Redhat 7.3 and Debian Testing using both the source RPM and by
building the deb (which had its own set of errors that I had to work
around). I also tried using the python setup.py script on both
distros as well. But I consistently got the error message below:
This is the command line I used:
linkchecker --recursion-level=2 --intern='!^mailto:' --extern-strict-
all www.lisc.org

This is the resulting error message:
Traceback (most recent call last):
File "/usr/bin/linkchecker", line 37, in ?
import linkcheck
File "/usr/lib/python2.3/site-packages/linkcheck/init.py", line
63, in ?
import linkcheck.logger.text
File "/usr/lib/python2.3/site-packages/linkcheck/logger/text.py",
line 27, in ?
import linkcheck.configuration
File "/usr/lib/python2.3/site-packages/linkcheck/
configuration.py", line 29, in ?
import linkcheck.log
File "/usr/lib/python2.3/site-packages/linkcheck/log/init.py",
line 49, in ?
from StandardLogger import StandardLogger
File "/usr/lib/python2.3/site-packages/linkcheck/log/
StandardLogger.py", line 19, in ?
from linkcheck import Config, i18n
File "/usr/lib/python2.3/site-packages/linkcheck/Config.py", line
21, in ?
from linkcheck import getLinkPat
ImportError: cannot import name getLinkPat

I took a poke through the source code of the previous release and
noticed that the getLinkPat function in the init.py file changed
to get_link_pat, which is what would seem to be causing the error.

@wummel
Copy link
Owner Author

wummel commented Dec 21, 2012

Submitted by calvin

Logged In: YES
user_id=9205

The file "Config.py" is from a previous release. If you
manually installed any old releases, you have to remove them
before using the new 1.13.0 release because I renamed quite
a bit of the files :)

I think this will help in your case:

  1. rm -rf /usr/lib/python2.3/site-packages/linkcheck/
    rm -f /usr/lib/python2.3/site-packages/_lincheck*.py
    rm -f /etc/lincheckerrc
    rm -rf /usr/share/linkchecker
    [... perhaps some more files in /usr/share/doc/linkchecker...]

  2. install the new version

I will put a note into the installation documentation about
having to purge old releases before installing the new one.

And if you're using Debian you could also use apt pinning to
use the official linkchecker package from unstable (see
apt_preferences(5) :)

@wummel
Copy link
Owner Author

wummel commented Dec 21, 2012

Submitted by edentz

Logged In: YES
user_id=878352

Oops. I would have grabbed the offical .deb, but it hadn't quite
propagated to the mirrors that I use when I started trying to install
1.13.0 yesterday. Using the official .deb this morning fixed all of my
issues Yea :-)
But the problems on the RedHat 7.3 box continue. It could very well be a
problem with my set up, but I thought you might like to know how it is
failing. I've upgraded to Python2.3 by using a SRPM: Python 2.3.3 (#1,
Feb 25 2004, 14:32:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96
-113)] on linux2
However /usr/bin/python is still a link to python1.5 in order to prevent
any problems with Redhat software that still uses it. So I use /usr/bin/
python2.3 to build the RPM. I edited the linkchecker.spec file and changed
the "python" occurences to "python2.3". Everything seems to build
properly, but after installing the RPM I get the following error message:
Traceback (most recent call last):
File "/usr/bin/linkchecker", line 37, in ?
import linkcheck
File "/usr/lib/python2.3/site-packages/linkcheck/init.py", line 63, in
?
import linkcheck.logger.text
File "/usr/lib/python2.3/site-packages/linkcheck/logger/text.py", line
27, in ?
import linkcheck.configuration
File "/usr/lib/python2.3/site-packages/linkcheck/configuration.py", line
27, in ?
import _linkchecker_configdata
ImportError: No module named _linkchecker_configdata

And a check inside /usr/lib/python2.3/site-packages/ reveals that the
_linkchecker_configdata.py files aren't there. I retraced my steps, rebuilt
and reinstalled the RPM and still no _linkchecker_configdata.py file.

So I completely removed the RPM using rpm --erase and then manually
purged any other linkcheck files left over (only a few empty directories).
Then tried a manual install with "sudo python2.3 setup.py install" inside
the linkchecker-1.13.0/ source directory. Everything looks fine and this
time _linkchecker_configdata.py is installed properly, but this time trying
to run linkchecker results in the following error:
Traceback (most recent call last):
File "/usr/bin/linkchecker", line 362, in ?
config.init_logging(debug=options.debug)
File "/usr/lib/python2.3/site-packages/linkcheck/configuration.py", line
145, in init_logging
logging.config.fileConfig(filename)
File "/var/tmp/python2.3-2.3.3-root/usr/lib/python2.3/logging/
config.py", line 68, in fileConfig
File "/usr/lib/python2.3/ConfigParser.py", line 505, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'formatters'

Since this error seems to be coming from Python packages and not
linkchecker I'm guessing that I might need a more recent version of
Python2.3?

Thanks for the great program and the quick responses.

Eirik

@wummel
Copy link
Owner Author

wummel commented Dec 21, 2012

Submitted by calvin

Logged In: YES
user_id=9205

I released fixed RPM packages (1.13.0-2) which include the
missing file.

@wummel wummel closed this as completed Dec 21, 2012
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

1 participant