Python Forum
Bad marshal data (string ref out of range) error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bad marshal data (string ref out of range) error
#1
Hi, I have an simple python script in a raspberry that the only thing that it do is execute some telegrams commands... http requests.... and enable or disable gpio outputs..

I run it on boot in crontab

15 days working fine and yesterday stops working, if I try to run manually and saw "bad marshal data (string reg out of range)".....

Who could be the trouble??
I tried several commands.... such as
apt --fix-broken install
pyclean .

And some more... and it start working again... someone knows about this error? How I can prevent that it fails again?

Python version installed is 2.7 and system up-to-date

Thanks!!
Reply
#2
We would need to see some code and the full text of the error to really diagnose this problem. I expect you just got some bad data back from one of your requests. You can't stop bad data coming in, but you can handle it gracefully. Typically you would use a try/except block, and the failing gracefully part would go in the except clause. Where exactly you would put that would depend on the full text of the error.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
Hi, but the trouble is not only with .py script...

I tried to use pip and get same error, try to execute only "python" and same error...

Can I search in the log system the error to post you? where can be logged this error?

Thanks a lot!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm getting a String index out of range error debian77 7 2,361 Jun-26-2022, 09:50 AM
Last Post: deanhystad
  How do you marshal the default printer setup to print? hammer 0 1,285 May-29-2022, 02:54 PM
Last Post: hammer
  matplotlib x axis range goes over the set range Pedroski55 5 3,228 Nov-21-2021, 08:40 AM
Last Post: paul18fr
  Python Error List Index Out of Range abhi1vaishnav 3 2,325 Sep-03-2021, 08:40 PM
Last Post: abhi1vaishnav
  pandas.errors.ParserError: Error tokenizing data. C error: Expected 9 fields in line Anldra12 9 15,376 Jun-15-2021, 08:16 AM
Last Post: Anldra12
  python error: bad character range \|-t at position 12 faustineaiden 0 3,702 May-28-2021, 09:38 AM
Last Post: faustineaiden
  index of range, but data prints out mrc06405j 1 2,345 Mar-25-2021, 07:20 PM
Last Post: buran
  string index out of range jade_kim 4 2,641 Jan-13-2021, 05:41 AM
Last Post: jade_kim
  List index out of range error while accessing 2 lists in python K11 2 2,138 Sep-29-2020, 05:24 AM
Last Post: K11
  user inputing data until in range Omer_ 1 1,606 Sep-24-2020, 07:14 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020