Post Reply 
Python script caused prime reboot - beta 2021-4-27
04-28-2021, 09:45 PM
Post: #1
Python script caused prime reboot - beta 2021-4-27
After entering something like this script in main.py
Code:
def mary():
    x={1:11,2:22,3:55}
    y=x.keys()
    for i in range(5):
        print(i, f"{y} i={i}", end=" ")
and running it with
Code:
import main
main.mary()
the G1 Prime rebooted itself! After going back into the Python app I found that the contents of the main.py script was gone. But the worst of it is that I can't run any Python programs anymore because even though main.py is empty, going into numeric view always gives me the following error
Code:
>import main
Traceback (most recent call last)
  File "<stdin>", line 1, in <module>
ImportError: no module named 'main'
Anything I type into main.py is cleared and lost when going from the Python editor into Python numeric mode, and the above error traceback appears.

Interestingly, if you say cancel when asked to re-import, then the contents of main.py are not lost, but the error traceback still occurs.

I tried deleting main.py and it gets recreated but the problem persists. I tried resetting the Python app on the G1 Prime, but that doesn't help either. I'm stuck!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Python script caused prime reboot - beta 2021-4-27 - tcab - 04-28-2021 09:45 PM



User(s) browsing this thread: 1 Guest(s)