-
I thought I'd try Codon on a ISM-band analysis program I wrote (https://github.com/hdtodd/rtl_433_stats , in the py-version directory). I'm new to Python, and Codon was helpful in pointing out a couple of situations in which I was misusing the language. But the next error, with the message above, is one I just can't interpret, though I think it's suggesting that I'm trying to act on two variables of mismatched types. eTime is a float constructed from a datetime string: I've confirmed that during execution in Python (with type()) the two are both floats. So I don't see what Codon is choking on. The offending line is: Does anyone have a clue what I've done wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Would you be able to provide a minimal reproducible example that can aid in debugging this error? |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce it, but I can point to the issue. I tried to create a minimal example, below. It failed to compile until I inserted the line I went back to my original program and defined the offending variables BEFORE any function definitions, and those compile-time errors were resolved. Codon complained that But Codon then complained that As a result of these edits, my code base is now pretty far from the working Python version, and I'm not sure I could reconcile the two back into one code base. So I'm going to put aside attempts to compile with Codon for now.
|
Beta Was this translation helpful? Give feedback.
@elisbyberi ,
I can't reproduce it, but I can point to the issue. I tried to create a minimal example, below. It failed to compile until I inserted the line
lc = 1
at the start of the code, above the function definition. Even with theglobal lc
in the function definition, if I just definedlc = 1
at the main program, after the function definition, codon errored-out and issued a messagename 'lc' is not defined
(three times: one for the global definition and two for the use in print statements).I went back to my original program and defined the offending variables BEFORE any function definitions, and those compile-time errors were resolved. Codon complained that
min
was used before it was…