Possible thonny 4.1.4 error #3102
MikeGreen99
started this conversation in
General
Replies: 4 comments 2 replies
-
Try to create a minimal program that demonstrates the error and post it here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi.
Thanks for your prompt response. I have attached a simple program and a small test file. The program will run fine, reading every record to eof. However, if I remove the "print (Data[1:6])" on line 18, the program does not read to eof.
Note: In case you are having trouble reading the attached ascii file CARSCODE.FIL, I have made a copy of it to CARSCODE.txt.
(I am using python 3.10.12 on ubuntu 22.04).
If you require any more info, please do not hesitate to ask.
Thanks,
M....
Sent with [Proton Mail](https://proton.me/) secure email.
On Tuesday, February 6th, 2024 at 09:46, Aivar Annamaa ***@***.***> wrote:
Try to create a minimal program that demonstrates the error and post it here.
—
Reply to this email directly, [view it on GitHub](#3102 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BF37UID3B77DQDH7UVSW6X3YSI64HAVCNFSM6AAAAABCZFNQ42VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGOBTGYZTG).
You are receiving this because you authored the thread.Message ID: ***@***.***>
NACTIV 1Oil/FIlter (Engine)
NACTIV 2Trans. Fluid/Filter
NACTIV 3Rear Diff. Flush/Check Fluid
NACTIV 4Cooling System
NACTIV 5Tranfer Case Flush/Check
NACTIV 6Front Diff. Flush/Check Fluid
NACTIV 7Remark
NACTIV 8Rear Diff. - Flush/check
NACTIV 9Added Oil
NACTIV 10Grease Only
NACTIV 11Fuel Injection
NACTIV 12Alt. Belt
NACTIV 13P.S. Belt
NACTIV 14A/C Belt
NACTIV 15Power Steering
NACTIV 16EVAP System
NACTIV 17Torque Converter
NACTIV 20Air Filter
NACTIV 21Gas Filter
NACTIV 22Fuel Pump
NACTIV 23Fuel lines & Tank
DDELET 24Warranty
NACTIV 30Carburetor & Linkages
DDELET 31Dielectric-HEI Distributor
NACTIV 32Timing Chain/Gears
NACTIV 33Distributor & HT Leads
NACTIV 34Engine General
NACTIV 35Spark Plugs Change/Check
NACTIV 36Valve Train
NACTIV 37Starter
NACTIV 38Battery
NACTIV 39Water Pump
NACTIV 40Alternator
NACTIV 41Delco Fuel Sys Treat+ 88861012
NACTIV 50Brakes Front Replace/Check
NACTIV 51Brakes Rear Replace/Check
NACTIV 52Brakes-Master/Rear Cyl & Lines
DDELET 53BRAKES FRNT CYL
DDELET 54BRAKES REAR CYL
DDELET 55BRAKE LINES
DDELET 56BRAKES FNT DISK
DDELET 57BRAKES REAR DRM
DDELET 58BRAKES REAR DISK
NACTIV 65Shocks Front
NACTIV 66Shocks Rear
NACTIV 70Front End/Steering
NACTIV 74Wheel Bearings Rear
NACTIV 75Wheel Bearings Front
NACTIV 76Tires Rotate
NACTIV 77Tires Buy/Check/Repair
NACTIV 78Rims
NACTIV 80Diff./Drive Shaft/U-Joints
NACTIV 81Used to be transfer case
NACTIV 82Used to be Front Differential
NACTIV 85Transmission
DDELET100Radiator/Thermostat/Cap
NACTIV101Heater Radiator
NACTIV102Heating & A/C
NACTIV103Mower Blades
NACTIV110Springs Front
NACTIV111FOB Battery
NACTIV112Springs Rear
DDELET114DUMMY
NACTIV120Exhaust
NACTIV130Body
NACTIV140Interior
NACTIV141Speedometer
NACTIV142Turn Engine Over
NACTIV143Signal Lights
NACTIV144Head/Tail Lights
NACTIV145Belt 6rib 2075mm PS/ALT/AC Nort
NACTIV146Belt 3rib 616MM Water Pump Nort
NACTIV147Vehicle Software Update
DDELET150Mower Blade
NACTIV151Radio Or NAV
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi.
Thanks for your prompt response.
I'm not asking you to debug the program - it works just fine. However, it reacts differently when I comment out a print statement.
In ubuntu Terminal, the program runs identical, with or without the print statement.
The program is below - just 8 lines of code. I did attach the file that is being read. You will have to change the file path in the program.
# ErrorThonny.py MG Feb.06.2024
# ubuntu 22.04 Thonny 4.1.4 python 3.10.12
# This program works fine - it read all records to eof.
# HOWEVER, IF I REMOVE the "print (Data[1:6])" on line 18,
# THAN EOF IS NOT REACHED
print ("Begin")
SubCodeFile= "/media/mg/DProgs/CarSystem/CARSCODE.FIL"
f = open(SubCodeFile, "rt")
while (Data := f.readline()): #Read to EOF
print(Data)
print (Data[1:6]) # TRY REMOVING THIS STATEMENT
print ("eof")
f.close()
M....
Sent with [Proton Mail](https://proton.me/) secure email.
…On Tuesday, February 6th, 2024 at 13:52, Aivar Annamaa ***@***.***> wrote:
I don't think anyone here has time for debugging this program.
If you think Thonny is faulty, you need to construct a much simpler program for demonstrating this.
—
Reply to this email directly, [view it on GitHub](#3102 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BF37UIFRJ3ZDI6SJTANNPD3YSJ3YHAVCNFSM6AAAAABCZFNQ42VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGOBWGY4TQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi.
Problem has been resolved. The file had a bad record.
However, just to note, the output in ubuntu Terminal was different to thonny when a print statement was removed.
Not to worry, it's all good now.
Thanks for you help,
M....
Sent with [Proton Mail](https://proton.me/) secure email.
…On Wednesday, February 7th, 2024 at 13:51, Aivar Annamaa ***@***.***> wrote:
In your second message I don't see any program, in your third message, there is something that looks like a Python program, but has syntax errors in it, possibly because your e-mail program lost the indents. I don't know whether print (Data[1:6]) # TRY REMOVING THIS STATEMENT should be under while or not.
—
Reply to this email directly, [view it on GitHub](#3102 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BF37UICLAXDXNLSHG3JR4BLYSPEKLAVCNFSM6AAAAABCZFNQ42VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGOJYG44DM).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have encountered an error in how the thonny ide executes my program. The program reacts differently in the thonny environment if I remove a 'print' statement.
However, If I run the program in ubuntu 22.04 Terminal, it will always execute correctly.
I would like to attach the program and a text file to simulate the error, but I do not know how to do so.
Is there a way to contact thonny.org via email ?
Thanks,
MG...
Beta Was this translation helpful? Give feedback.
All reactions