Giter Club home page Giter Club logo

Comments (5)

stapleCamel avatar stapleCamel commented on September 17, 2024

Is the file path surrounded by single or double quotes (like "C:/Users/DEVELOP/") in your code?

from dnppy.

Syntaf avatar Syntaf commented on September 17, 2024

As @stapleCamel mentioned, it looks like your aren't using strings. Python is using a literal interpretation of your file path and thinks you're doing some wonky expression. You wan't to use strings as a path

def make_cloud_mask_8(
    "C:/Users/DEVELOP4/Desktop/landsat/trial/2015_08_17_testing/LC80150342015229LGN00_BQA.TIF", 
    outdir = "C:/Users/DEVELOP4/Desktop//landsat/trial//2015_08_17_testing/"):

If you don't encapsulate your path inside of a string, Python has no way of knowing you aren't trying to write some sort of syntax expression. e.g. writing for i in some_list: is very different from writing "for i in some_list:". One is an expression that python interprets and executes, the other is a string containing that information

from dnppy.

arikaegan avatar arikaegan commented on September 17, 2024

Now it says:

"Traceback (most recent call last):
File "C:\Users\DEVELOP4\Desktop\landsat\trial\cloud_mask.py", line 1, in
from dnppy import core
File "C:\Python27\lib\site-packages\dnppy__init__.py", line 23, in
from convert import *
File "C:\Python27\lib\site-packages\dnppy\convert__init__.py", line 16, in
from extract_GCMO_NetCDF import *
File "C:\Python27\lib\site-packages\dnppy\convert\extract_GCMO_NetCDF.py", line 9, in
import arcpy
ImportError: No module named arcpy"

I have already downloaded dnnpy and arcpy, but it seems to have trouble finding them. Any suggestions as to fixing this?

from dnppy.

stapleCamel avatar stapleCamel commented on September 17, 2024

Which Python are you using? I believe ArcGIS comes with its own Python27 which has the arcpy module whereas the regular Python distribution can't use it.

from dnppy.

Jwely avatar Jwely commented on September 17, 2024

@stapleCamel is right. I can tell from your filepaths that you are not running your script from the python installation with arcpy in it.

If it were running from the correct installation, it would say something like "C:\Python27\ArcGIS10.3\lib\site-packages\dnppy...".

The way to fix this is to ensure you are using the correct interpreter, or to simply uninstall the versions of python on your system that are NOT in the ArcGIS directory. If your simply using IDLE, you can ensure you use the correct one by opening it from "C:\Python27\ArcGIS10.3\Lib\idlelib\idle.py". Make a shortcut for that interpreter and use that to edit your scripts in.

Note that your exact filepath may be a little different if your ArcGIS version is different.

from dnppy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.