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

Module 'ogr' has no attribute 'Open' #521

Open
mkmitchell opened this issue Jul 30, 2021 · 0 comments
Open

Module 'ogr' has no attribute 'Open' #521

mkmitchell opened this issue Jul 30, 2021 · 0 comments

Comments

@mkmitchell
Copy link

It seems like every year or two I have to run code I wrote in 2016 and I come back here for some help getting it going again. Thank you for the continued help.

Here is what I've tried so far. I couldn't create the environment within windows conda so I'm using the windows subsystem for linux (ubuntu 20.04). I installed conda and cloned the ocgis repo then ran
conda env create -f environment.yml
After activating I tried to run https://github.com/mkmitchell/WSI_Processing/blob/master/OCGIS_summarize_by_polygon.py
but it failed because ogr wasn't found. I installed ogr with
pip3 install --user ogr
then ran it again and got

Traceback (most recent call last):
  File "OCGIS_summarize_by_polygon.py", line 32, in doCalc
    ops.execute()
********
    ds = ogr.Open(shp_path)
AttributeError: module 'ogr' has no attribute 'Open'

I removed a lot of the error above to the important stuff. If I import ogr I can run ogr.Open and it works fine.

Think you can help me out?
Thanks

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