celery throws unicodedecodeerror when try to start
Question: I want to run example code(tasks.py) from official tutorial:

    
    
    from celery import Celery
    app = Celery('tasks', broker='amqp://guest@localhost//')
    @app.task
    def add(x, y): return x + y
    

I used command "celery -A tasks worker --loglevel=info" as shown in the
tutorial. But, when I execute this command python throws UnicodeDecodeError:

    
    
    C:\kaznmu\virtualenvs\example\Scripts>celery -A tasks worker --loglevel=info
    Traceback (most recent call last):
      File "C:\kaznmu\virtualenvs\example\Scripts\celery-script.py", line 9, in <mod
    ule>
        load_entry_point('celery==3.1.8', 'console_scripts', 'celery')()
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\__main__.py", lin
    e 30, in main
        main()
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\celery.py", l
    ine 80, in main
        cmd.execute_from_commandline(argv)
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\celery.py", l
    ine 746, in execute_from_commandline
        super(CeleryCommand, self).execute_from_commandline(argv)))
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\base.py", lin
    e 308, in execute_from_commandline
        return self.handle_argv(self.prog_name, argv[1:])
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\celery.py", l
    ine 738, in handle_argv
        return self.execute(command, argv)
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\celery.py", l
    ine 692, in execute
        ).run_from_argv(self.prog_name, argv[1:], command=argv[0])
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\worker.py", l
    ine 175, in run_from_argv
        return self(*args, **options)
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\base.py", lin
    e 271, in __call__
        ret = self.run(*args, **kwargs)
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\worker.py", l
    ine 195, in run
        hostname = self.simple_format(default_nodename(hostname))
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\base.py", lin
    e 569, in simple_format
        return self._simple_format(s, socket.gethostname(), **extra)
      File "C:\kaznmu\virtualenvs\example\lib\site-packages\celery\bin\base.py", lin
    e 574, in _simple_format
        name, _, domain = host.partition('.')
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 5: ordinal
    not in range(128)
    

  * I tried reinstall all python libraries and use different versions, but this doesn't help. How can I run celery?
  * I use Windows7 and Python2.7
  * Official tutorial here <http://docs.celeryproject.org/en/master/getting-started/first-steps-with-celery.html#first-steps>


Answer: Problem is russian characters in pc name. Solved by renaming pc name.

