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

How to debug mesa-geo? AttributeError: module 'ntpath' has no attribute 'sep' #41

Open
stefaneidelloth opened this issue Apr 1, 2022 · 1 comment

Comments

@stefaneidelloth
Copy link

stefaneidelloth commented Apr 1, 2022

If I try to debug a mesa-geo application in PyCharm on Windows ... for the line

tornado.ioloop.IOLoop.current().start()

in ModularViualization.py

I get:

C:\python_env\App\PyCharm\..\..\App\WinPython\python-3.10.2.amd64\python.exe C:\python_env\App\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 52260 --file C:/python_env/workspace/TechDiff/src/main.py
Connected to pydev debugger (build 213.6777.50)
Interface starting at http://127.0.0.1:8521
ERROR:tornado.application:Uncaught exception GET /static/css/bootstrap.min.css (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8521', method='GET', uri='/static/css/bootstrap.min.css', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "C:\python_env\App\WinPython\python-3.10.2.amd64\lib\site-packages\tornado\web.py", line 1704, in _execute
    result = await result
  File "C:\python_env\App\WinPython\python-3.10.2.amd64\lib\site-packages\tornado\web.py", line 2573, in get
    self.path = self.parse_url_path(path)
  File "C:\python_env\App\WinPython\python-3.10.2.amd64\lib\site-packages\tornado\web.py", line 2961, in parse_url_path
    if os.path.sep != "/":
AttributeError: module 'ntpath' has no attribute 'sep'

If I run mesa-geo without debugging I do not get this error.

versions:
mesa-geo: 0.2.0
tornado: 6.1
pycharm: 2021.3.2 (Community Edition)

=> Do I need to consider something special if I want to debug mesa-geo?

@stefaneidelloth stefaneidelloth changed the title AttributeError: module 'ntpath' has no attribute 'sep' How to debug mesa-geo? AttributeError: module 'ntpath' has no attribute 'sep' Apr 1, 2022
@stefaneidelloth
Copy link
Author

As a workaround I added following line in my code

os.path.sep = os.sep # fixes tornado issue

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