Jump to content
Sign in to follow this  
dil_bert

on win 7 :: upycraft IDE version 1.0 Traceback (most recent call last): raise SerialException("could not open port %s: %s" %

Recommended Posts

dear community - hello dear Freaks, 


I'm trying to get upycraft ide version 1.0 up and running  on a notebook with win 7

 

note: i also tried this to install on a Linux notebook (mx-linux) and had some issues:  (cf: https://randomnerdtutorials.com/install-upycraft-ide-linux-ubuntu-instructions/ - but afaik these issues had to  do with the pyenv - and finally i think that i have fixed these things with  the apt-get install python3-venv - i used sudo with that command. After installing the python3-venv package, i created the virtual environment)


regarding the Windows-version: i get the following error message when i run the code:

Traceback (most recent call last):
File "C:\Python32\ lorem ipsum etc .py", line 50, in <module>

raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port COM4: [Error 5] Access is denied.

 

question: Why is access denied? I'm the system administrator. Could it be a problem with the code? 
cf . https://stackoverflow.com/questions/6105182/error-while-opening-port-in-python


i have tried to figure it out: but afaik i have not the solution: 

note: Is the code running with admin privledges? Does COM4 exist on your machine? Try checking with HyperTermina

some mentioned that they have a solution but i am  not sure: 

Quote

 

a.  I figured it out. Simple enough, I just disabled the COM port in the device manager window and enabled it again.
b. The most common source of such errors is the port being already opened by some other application, 
or frequently by a previous (executed, but forgotten to kill) instance of your code.
To test this hypothesis, the easiest way is to run some other program that opens the same port 
(for example Hyperterminal) when you're getting the error. If it fails also, try to find who's holding the port.
Also, Portmon is a useful tool in debugging similar problems with the serial port. 

c.  Since this is a top search result, I'm updating it to add another situation that also creates the Access Denied error: 
The port permissions are actually set to deny normal user access! Some sysadmins lock-down ports for good reasons, 
so only users with Administrator privileges can get access. The simplest work-around is to run cmd.exe as Administrator.  See this: http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/ Summary: Win+r, "cmd", Shift+Ctrl+Enter
"It Works For Me!" (tm)

 


these discussed solutions did not work for me...: 


do you have any ideas!? 

above all: i am so happy to be here in this  great place. plz keep up the great work - this place is one of the best places for help in all php things and much much more!!!

many thanks to all the supporters here!!! you guys rock!

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.