Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError !when i driver MCP2210 in Python window7 #15

Open
yifanshu02 opened this issue Dec 27, 2016 · 0 comments
Open

TypeError !when i driver MCP2210 in Python window7 #15

yifanshu02 opened this issue Dec 27, 2016 · 0 comments

Comments

@yifanshu02
Copy link

hi,@Arachnid
when i driver MCP2210 in Python3.5.2 window7,i encounter a problem:

>>> from mcp2210 import MCP2210
>>> dev = MCP2210(0x04D8,0x00DE)
>>> dev.manufacturer_name = "123"
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    dev.manufacturer_name = "123"
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\device.py", line 77, in setter
    self.sendCommand(set_command(value))
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\commands.py", line 91, in __init__
    self.string = s
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\commands.py", line 100, in string
    self.str[i] = ord(x)
TypeError: ord() expected string of length 1, but int found
>>> 

PS: i have modifyed the code according to @bddap in the "Pull Requests"
please give me a hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant