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

Python: unicode error #2

Open
guskovd opened this issue Sep 21, 2018 · 0 comments
Open

Python: unicode error #2

guskovd opened this issue Sep 21, 2018 · 0 comments

Comments

@guskovd
Copy link
Owner

guskovd commented Sep 21, 2018

raceback (most recent call last):
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/bin/invoke", line 11, in
sys.exit(program.run())
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/program.py", line 335, in run
self.execute()
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/program.py", line 491, in execute
executor.execute(*self.tasks)
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/executor.py", line 129, in execute
result = call.task(*args, **call.kwargs)
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/tasks.py", line 128, in call
result = self.body(*args, **kwargs)
File "/Users/evgenijsemenov/repos/openstack-dev/tasks.py", line 90, in provision
cmd.run("stack -p %s provision --keep-forever -s %s %s -- %s" % (kwargs['profile'], kwargs['provision'].split(' ')[0], kwargs['server'], " ".join(kwargs['provision'].split(' ')[1:])))
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/context.py", line 94, in run
return self._run(runner, command, **kwargs)
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/context.py", line 101, in _run
return runner.run(command, **kwargs)
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 271, in run
return self._run_body(command, **kwargs)
File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 365, in _run_body
raise ThreadException(thread_exceptions)
invoke.exceptions.ThreadException:
Saw 2 exceptions within threads (UnicodeEncodeError, UnicodeEncodeError):

Thread args: {'kwargs': {'buffer_': [u' Disk 1 Online 10 GB 0 B \r\nalready inited\nalready formatted\n',
u'Junction created for c:\hab\pkgs <<===>> d:\hab\pkgs\r\n',
u'\r\n\r\n Directory: C:\hab\svc\r\n\r\n\r\nMode LastWriteTime Length Name \r\n---- ------------- ------ ---- \r\nd----- 9/21/2018 3:33 PM windows-service \r\n',
u'[SC] CreateService SUCCESS\r\n',
u'[SC] ChangeServiceConfig2 SUCCESS\r\n',
u'Congratulations! The Habitat Service has succesfully been installed!\n\r\n\r\n',
u'\r\nSERVICE_NAME: Habitat \r\n TYPE : 10 WIN32_OWN_PROCESS \r\n STATE : 2 START_PENDING \r\n (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)\r\n WIN32_EXIT_CODE : 0 (0x0)\r\n SERVICE_EXIT_CODE : 0 (0x0)\r\n CHECKPOINT : 0x0\r\n WAIT_HINT : 0x7d0\r\n PID : 2656\r\n FLAGS : \r\n',
u'waiting Habitat supervisor\n'],
'hide': False,
'output': <open file '', mode 'w' at 0x7f282804f150>},
'target': <bound method Local.handle_stdout of <invoke.runners.Local object at 0x7f2820c72b50>>}

Traceback (most recent call last):

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/util.py", line 233, in run
super(ExceptionHandlingThread, self).run()

File "/hab/pkgs/core/python2/2.7.15/20180717141339/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 564, in handle_stdout
buffer_, hide, output, reader=self.read_proc_stdout

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 537, in _handle_output
self.write_our_output(stream=output, string=data)

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 525, in write_our_output
stream.write(encode_output(string, self.encoding))

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/util.py", line 159, in encode_output
string = string.encode(encoding)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)

Thread args: {'kwargs': {'buffer_': [u"2018-09-21 15:31:17 INFO Creating server 'se-ie9'...\n",
u"2018-09-21 15:31:19 INFO Volume with name 'se-ie9-volume' already exists\n",
u'2018-09-21 15:31:42 INFO Waiting for network in server\n',
u"2018-09-21 15:31:50 INFO Assign floating ip '172.27.252.148' to server 'se-ie9'\n",
u"2018-09-21 15:31:53 INFO Wait for server 'se-ie9' start up\n",
u'2018-09-21 15:31:54 INFO Skipping WaitSaltInitAction. The server will not be serviced by the salt-master\n',
u'2018-09-21 15:31:54 INFO Waiting ssh available ...\n',
u'2018-09-21 15:32:52 INFO converge via command: ./provision/selenoid_ie_node.py -e production -v 9\n'],
'hide': False,
'output': <open file '', mode 'w' at 0x7f282804f1e0>},
'target': <bound method Local.handle_stderr of <invoke.runners.Local object at 0x7f2820c72b50>>}

Traceback (most recent call last):

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/util.py", line 233, in run
super(ExceptionHandlingThread, self).run()

File "/hab/pkgs/core/python2/2.7.15/20180717141339/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 577, in handle_stderr
buffer_, hide, output, reader=self.read_proc_stderr

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 537, in _handle_output
self.write_our_output(stream=output, string=data)

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/runners.py", line 525, in write_our_output
stream.write(encode_output(string, self.encoding))

File "/Users/evgenijsemenov/.virtualenvs/openstack-dev/lib/python2.7/site-packages/invoke/util.py", line 159, in encode_output
string = string.encode(encoding)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-15: ordinal not in range(128)

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