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

Unable to import floppyforms.gis, geometry widgets not available #172

Closed
foobarbaz2 opened this issue May 16, 2016 · 9 comments
Closed

Unable to import floppyforms.gis, geometry widgets not available #172

foobarbaz2 opened this issue May 16, 2016 · 9 comments

Comments

@foobarbaz2
Copy link

foobarbaz2 commented May 16, 2016

/home/foo/anaconda2/envs/flightsayer/lib/python2.7/site-packages/floppyforms/init.py:16: UserWarning: Unable to import floppyforms.gis, geometry widgets not available
"Unable to import floppyforms.gis, geometry widgets not available")

Ok, I get that this happens on "from . import gis", but I don't understand what's going on.

(Everything worked fine until this morning, after I upgraded some stuff on my computer, and now I'm seeing this message and AHHHHH)

@askoretskiy
Copy link

@foobarbaz2 How did you fix it?

@BakanovKirill
Copy link

@foobarbaz2 How did you fix it? +1

2 similar comments
@chrnolte
Copy link

@foobarbaz2 How did you fix it? +1

@bnisevic
Copy link

bnisevic commented May 23, 2017

@foobarbaz2 How did you fix it? +1

@Wipqozn113
Copy link

Wipqozn113 commented Jun 1, 2017

Ran into the same issue. To figure out what wrong I edited floppyforms/init.py and removed the try/except on "from . import gis" so I could see what error I was actually getting.

so this:
16 try: 17 from . import gis 18 except Exception: 19 import warnings 20 warnings.warn( 21 "Unable to import floppyforms.gis, geometry widgets not available") 22 23 __version__ = '1.7.0'

became this:

16 from . import gis

This showed me the the "gdal" library wasn't installed. I tried install gdal with "pip install gdal", but I just ran into more issues about gdal not being installed. I eventually realized that the issue was that I needed to install gdal on my system, independent of python, and that Python makes use of it.

I'm on macos, so that meant I needed to run:

brew install gdal --HEAD

Source: https://gis.stackexchange.com/questions/155403/installing-gdal-on-macosx

I suspect others might be running into the same issue. My suggestion would be to install the gdal library on your system or remove the try/except around "from . import gis" so you can see what error you're actually getting.

@ivancuric
Copy link

Running brew install gdal --HEAD produces compilation errors, but I managed to install it from https://github.com/OSGeo/homebrew-osgeo4mac

Running into the same error.

Both gdal2 and gdal2-python are visible in the PATH:

export PATH="/usr/local/opt/gdal2/bin:$PATH"
export PATH="/usr/local/opt/gdal2-python/bin:$PATH"
ogr2ogr --version
GDAL 2.2.2, released 2017/09/15

@thauk-copperleaf
Copy link

How can this warning be silenced/eliminated without having to brew-install an external package?

@cjerdonek
Copy link

cjerdonek commented Apr 8, 2018

See here for how to silence the warning without having to install anything.

@marcossouz
Copy link

marcossouz commented Apr 14, 2020

On Debian/Ubuntu
Running: sudo apt-get install binutils libproj-dev gdal-bin

source: https://docs.djangoproject.com/en/3.0/ref/contrib/gis/install/geolibs/

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

10 participants