[Tutor] NumPy Generates ValueError: Some errors were detected ! Line #9 (got 42 columns instead of 1)

David bouncingcats at gmail.com
Sat Sep 28 20:44:20 EDT 2019


On Sun, 29 Sep 2019 at 02:36, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> On 09/27/2019 12:22 PM, Alan Gauld via Tutor wrote:
> > On 27/09/2019 12:47, Stephen P. Molnar wrote:

> Thank you for your reply. There are, in fact, hidden characters in the
> input file (cat -A ...):
>
> > ^IRMSD TABLE$
> > ^I__________$
> > $
> > _____________________________________________________________________$
> >      |      |      |           |         |                 |$
> > Rank | Sub- | Run  | Binding   | Cluster | Reference       | Grep$
> >      | Rank |      | Energy    | RMSD    | RMSD            | Pattern$
> > _____|______|______|___________|_________|_________________|___________$
> >    1      1      8       -7.23      0.00     93.07 RANKING$
> >    1      2      9       -6.79      1.39     92.64 RANKING$
> >    2      1     16       -7.18      0.00     93.19 RANKING$
> >    3      1      2       -6.93      0.00     93.38 RANKING$
> >    3      2     17       -6.84      0.23     93.45 RANKING$
> >    4      1     15       -6.55      0.00     91.83 RANKING$
> >    4      2      7       -6.34      0.33     91.77 RANKING$
> >    5      1      5       -6.41      0.00     93.05 RANKING$
> >    6      1      3       -6.36      0.00     92.84 RANKING$
> >    6      2     10       -6.28      0.47     92.92 RANKING$
> >    6      3      6       -6.27      0.43     92.82 RANKING$
> >    6      4     18       -6.25      0.32     92.88 RANKING$
> >    6      5     13       -6.24      0.96     92.75 RANKING$
> >    6      6      1       -6.24      0.87     92.60 RANKING$
> >    6      7     14       -6.21      0.51     92.90 RANKING$
> >    6      8     11       -6.14      0.98     92.78 RANKING$
> >    6      9     20       -6.11      0.71     92.67 RANKING$
> >    6     10     19       -6.01      1.36     93.00 RANKING$
> >    7      1     12       -6.30      0.00     93.28 RANKING$
> >    8      1      4       -5.85      0.00     92.97 RANKING$
> > _______________________________________________________________________$
> but no periods.

Depending on the problem you are having, it can be helpful
to check for non-visible characters that might upset your
parser, so thanks for letting us know that you did this 'cat -A'.

But I wonder why you say "There are, in fact, hidden characters in the
input file".

Are you aware that '^I' is how 'cat -A' represents a tab
character, and that '$' is how it represents a newline character?
I don't think either of these will cause you any trouble in
this case. And I don't see any other hidden characters.

Also when cutting and pasting to show us information,
please also include the command you typed in your cut/
paste. Don't retype it in your explanatory text like you did
above because that vastly degrades your readers
confidence in the quality of the information provided.
If people are trying to help you, it's nice to help them
do so.


More information about the Tutor mailing list