Opened 10 years ago

Closed 9 years ago

#83 closed defect (fixed)

Importing PyTables HDF5 wrapper generates BytesWarning

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: minor Milestone:
Component: Infrastructure Version:
Keywords: Cc: gregc@…, conrad@…, pett@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: chimera

Description

Opening an HDF5 density map (file suffix .cmap) generates a couples BytesWarning messages about comparison of string to bytes to the log panel. The warnings are issued when PyTables is imported (import tables). They are issued in a numpy dtype constructor call (implemented in C). The underlying problem is that numpy is not cleanly ported to Python 3. Numpy C code would have to be fixed to avoid this warning.

This warning from numpy is usually not seen. By default BytesWarning produces no message from the Python warnings module. But the Chimera 2 frozen main specifically enables these warnings in

src/apps/chimera2/frozen.patch

While it is good to see errors in our code comparing bytes and strings, it is a nuisance to get stray warning messages from third-party packages.

Not sure what to do about this.

Change History (1)

comment:1 by Tom Goddard, 9 years ago

Resolution: fixed
Status: newclosed

Took out our debug code that enabled BytesWarning.

Note: See TracTickets for help on using tickets.