[Tutor] NumPy Generates ValueError: Some errors were detected ! Line #9 (got 42 columns instead of 1)
Cameron Simpson
cs at cskk.id.au
Tue Oct 1 19:37:39 EDT 2019
On 29Sep2019 10:44, David <bouncingcats at gmail.com> wrote:
>On Sun, 29 Sep 2019 at 02:36, Stephen P. Molnar <s.molnar at sbcglobal.net> 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$
[...]
>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?
Well, "end of line". But I'm being overly picky.
>I don't think either of these will cause you any trouble in
>this case. And I don't see any other hidden characters.
Except that there is indeed whitespace in his display above, and it
isn't TAB characters. I suspect some weirdness with his initial
cut/paste.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list