Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
METADATA Errors
#1
A while back when I upgraded pip to 20.1 I got the occasional error:
"ValueError: Entry points must be listed in groups"

I didnt think much of it, and assumed it was a result of the package being designed for the wrong OS (coming up as an incorrect 'group'). This is in Windows. I havent yet checked in on the Debian boot.

Recently in Win I had a BSOD after I tried a program to fix my hibernating problem. It forced a hard reboot and after experiencing some systemic errors I ran a CHKDSK, which found what looked like thousands of errors, and apparently fixed them. I also ran HDSentinel in a low level test/fix mode where it found two soft errors and fixed them, with no other problems to the drive.

However....

Python started giving errors, especially on installs. Frequently the installs would go through, with a morass of info including the above error and
AttributeError: _ep_map

Also I was getting UTF8 errors, pointing to numerous characters in the METADATA file in the modules-distutil directory in /site-packages.

At that point I reinstalled setuputils, pkginfo, and forced a pip reinstall.
Things got a little better as the utf8 errors disappeared, but... there were still alot of packages showing up with errors.

I used:
"Find get_entry_map(self, group=None): into python\Lib\sitepackages\pkg_resources\__init__.py. Insert after print self.egg_info"

which showed even more METADATA errors.
Typically they take the form of where the file is usually turned into garbled binary. Now ones that were totally empty were showing up. Sometimes an adjoining file was corrupted, but so far only errors in the 'distinfo' dirs.

Sometimes taking and renaming the PKG-INFO from the wheels would help, but I have found instances where a full reinstall of the packages was needed.

Now the obvious solution to this problem would be to reinstall Python. But that is a non-starter here, as it is a large install with over 5000 packages.

My question is: Are there any utils that will check the integrity of packages and automatically reinstall damaged ones?

Or at least a basic outline of a script that can check for inappropriate content (zero, or binary bytes) parse into a script to --force-reinstall of the modules. I might be able to do this in perl, but my python skills are not so far advanced.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question image manipulation (cropping and MetaData) SpongeB0B 4 1,099 Jul-03-2023, 06:35 PM
Last Post: SpongeB0B
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,522 Mar-28-2022, 04:42 PM
Last Post: Larz60+
  Adding Language metadata to a PDF programmatically bhargavi22 0 1,911 Aug-17-2020, 12:53 PM
Last Post: bhargavi22
  How to sort image files according to a metadata file? Brahmslove 1 3,073 Dec-05-2019, 11:25 PM
Last Post: scidam
  Parse the data in XML metadata field klllmmm 2 3,216 Jun-19-2019, 04:24 PM
Last Post: klllmmm
  Tiff metadata sudecki 1 16,941 Aug-10-2018, 07:08 AM
Last Post: sudecki
  Video Metadata Question malonn 10 9,361 Jul-23-2018, 04:04 PM
Last Post: malonn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020