tudelft3d / ifcgref

MIT License
17 stars 1 forks source link

TypeError: unsupported operand type(s) for /: 'float' and 'NoneType' #6

Closed ar-chad closed 2 months ago

ar-chad commented 3 months ago

After georeferencing ifc files to EPSG 25388 it was possible to download files, but not show them on the map. The latest version from GitHub of the IfcGref was used for the conversion with Python 3.11.6 on macOS 14.0.

Error log:

`TypeError TypeError: unsupported operand type(s) for /: 'float' and 'NoneType' Traceback (most recent call last)

    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 1498, in __call__
return self.wsgi_app(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 1476, in wsgi_app
response = self.handle_exception(e)
               ^^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/ifcgref3/lib/python3.11/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    File "/git/ifcgref/app.py", line 589, in visualize
Snew = Snew/Scale_value
           ^^^^^^^^^^^^^^^^



TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'`

amiroo4 commented 2 months ago

Thanks. Solved.

ar-chad commented 2 months ago

I cloned the latest version today, created venv, activated and installed requirements. I see the same error as above after trying to show on map. My Python version is 3.12.4.

amiroo4 commented 2 months ago

I see. The website was updated earlier than Github repo. You check it now.