0

I created a simple web server using bottle to use as a mock to test an application that has to send some information to a server. However, when I tried to debug the server in PyCharm, it raised the error below:

SyntaxError: ("Non-ASCII character '\\xca' in file /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details", ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 1, 0, None))

If I run the server in Pycharm, it runs without any problem

I'm running PyCharm CE 2020.1, on a mac with Mojave (10.14.6) and bottle.py

franksands
  • 1,748
  • 16
  • 21

1 Answers1

0

According to this answer for a similar problem with django, Pycharm debugger has a problem with python code that restarts based on changes in the source code. I changed my bottle start up to:

run(app, host=config['host'], port=config['server_port'], reloader=False)

And now it works.

franksands
  • 1,748
  • 16
  • 21