Dronekit on windows - can not find files

Hello I am trying to connect my rover via Drone python kit , so i was told that the best way to do it ,i is to call the file in the command prompt using admin privileges

I have been trying to do that but it say “no such file or directory” i have been trying to figure out how to change the directory or path with no luck , I created a folder for which my code is saved under but I still have not been able to call on it . Can someone please help Thank you !
admin file
folder for script

You’ll want the cd command: https://en.wikipedia.org/wiki/Cd_(command)

when using the cd command, would i type the name of the folder or the the name of the file ?

The name of the folder. For example:

cd C:\users\stephen\Desktop

Then you can execute the file

1 Like

error

Hey I am still getting the same error, I’m not sure what I may be doing wrong

nevermind i got it to change directory lol i was i typing it in wrong , did not realize it was case and space sensitive
But it still saying the file i am looking for is not in that directory . When i look under the properties of the file is say it in that directory that i change it too
i dont get it

Type in dir and it will list all files in the current folder.

dir

i see the folder im looking for “python code” , the file is in that folder . but i still getting that error when calling it

You need to cd into the “python code” directory, as that is where your connect.py file is?

In that case: cd "python code" then python connect.py

ok cool thanks that worked perfectly and now its reading the file but it keep saying permission denied . looking it on google but have not found anything yet . im using the right “com” and i thought since im using the admin cmd prompt it should override everything

Try COM8 instead. It might be case sensitive

im still getting this error : PermissionError: [Errno 13] Permission denied: ‘com8’

i used “COM8” but it still came back as this

Either you have the wrong COM port or another program is using the port.

okay i have the mission planner application open and it calls that port “com8” . that may be the reason, so should I have mission planner closed when trying to using Dronekit ?

Mission Planner must not be in the “Connected” state for the relevant serial port. It’s ok to just be open and Disconnected though.

okay gotchu so i was having it connected so i disconnected it and reran the code but now it says "no module named serial " I been checking everything making sure i was using the right code and com port and it seems like i am but something still is off

You haven’t got pyserial installed. Type in pip install pyserial --user to install it.

okay got it ! just downloaded it . it made a small difference . the first time i ran it i gave e that message in the image but now it not saying anything and I don’t believe its connecting anything

code

Thank you for all your help BTW!

Not sure. I’d need a copy of the script you’re trying to run to debug it.