[Errno 22] Invalid argument problem

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

[Errno 22] Invalid argument problem

Post by t4tomer » Mon Jul 23, 2018 3:36 pm

hello I am trying to work with micropyton v1.1. I try to make the led to turn on but i fail . this is my code :

import pyb
pyb.LED(4).on()

but when i try to save it by the name 'main.py' i get this error :
[Errno 22] Invalid argument :'G/main.py'

how to fix this problem ?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: [Errno 22] Invalid argument problem

Post by pythoncoder » Tue Jul 24, 2018 5:53 am

You haven't really given us much to go on here.

I'm guessing you're using a Pyboard 1.1 as the MicroPython language is at version 1.9.4, and I'm guessing you're using Windows and the Pyboard is mapped to drive G:. Please confirm. If so, have you checked that drive G: contains main.py and boot.py as a new Pyboard should have those already present.

What editor are you using and how are you saving the file? What program is producing this error message? What terminal emulator are you using to access the Pyboard REPL?
Peter Hinch
Index to my micropython libraries.

t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

Re: [Errno 22] Invalid argument problem

Post by t4tomer » Tue Jul 24, 2018 7:57 am

I am using the Pyboard 1.1 .
I am using windows and my python verson is : 'IDLE (Python 3.6 32-bit).
the Pyboard indeed mapped to drive G, and it does contain the main.py and boot.py .
I am using IDLE (Python 3.6 32-bit) to edit the program

by the way i am new to python , I am used to program Matlab and C language.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: [Errno 22] Invalid argument problem

Post by Roberthh » Tue Jul 24, 2018 1:30 pm

[Errno 22] Invalid argument :'G/main.py'
Should not the files you save to be named "G:/main.py"?

Post Reply