You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently updated from python 2.7 to 3.6, on line 14 of nmb/utils.py, I am getting TypeError: can't concat str to bytes.
File "/home/user/miniconda2/envs/myenvrionment/lib/python3.6/site-packages/nmb/utils.py", line 14, in encode_name name = name.ljust(15) + chr(type) TypeError: can't concat str to bytes
My guess would be to change chr(tpye) to bytes([type]), though I am not sure if pysmb supports python3.6 yet or if this was brought up before. Any workaround for now?
The text was updated successfully, but these errors were encountered:
I am not able to reproduce your error.
Running on Ubuntu 18.04 gives me the following:
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from nmb.nmb_constants import *
>>> from nmb.utils import encode_name
>>> encode_name('TESTMACH', TYPE_WORKSTATION)
b' FEEFFDFEENEBEDEICACACACACACACAAA\x00'
If you are using virtualenv, did you do-setup of the virtualenv when you upgrade your python?
Currently using version 1.1.27
Recently updated from python 2.7 to 3.6, on line 14 of nmb/utils.py, I am getting TypeError: can't concat str to bytes.
File "/home/user/miniconda2/envs/myenvrionment/lib/python3.6/site-packages/nmb/utils.py", line 14, in encode_name name = name.ljust(15) + chr(type) TypeError: can't concat str to bytes
My guess would be to change chr(tpye) to bytes([type]), though I am not sure if pysmb supports python3.6 yet or if this was brought up before. Any workaround for now?
The text was updated successfully, but these errors were encountered: