TypeError when initializing Nco object using python/pynco
up vote
0
down vote
favorite
I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to initialize an object.
Here are the commands I'm using:
from nco import Nco
nco = Nco()
And the error is:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:Python27ArcGIS10.5libsite-packagesnconco.py", line 54, in __init__
self.NCOpath = os.path.split(which('ncks'))[0]
File "C:Python27ArcGIS10.5libntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:Python27ArcGIS10.5libntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
This suggests to me that the install may not have worked properly, though I can run NCO commands from the command line.
Any idea what the problem may be?
python typeerror netcdf nco pynco
add a comment |
up vote
0
down vote
favorite
I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to initialize an object.
Here are the commands I'm using:
from nco import Nco
nco = Nco()
And the error is:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:Python27ArcGIS10.5libsite-packagesnconco.py", line 54, in __init__
self.NCOpath = os.path.split(which('ncks'))[0]
File "C:Python27ArcGIS10.5libntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:Python27ArcGIS10.5libntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
This suggests to me that the install may not have worked properly, though I can run NCO commands from the command line.
Any idea what the problem may be?
python typeerror netcdf nco pynco
1
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to initialize an object.
Here are the commands I'm using:
from nco import Nco
nco = Nco()
And the error is:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:Python27ArcGIS10.5libsite-packagesnconco.py", line 54, in __init__
self.NCOpath = os.path.split(which('ncks'))[0]
File "C:Python27ArcGIS10.5libntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:Python27ArcGIS10.5libntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
This suggests to me that the install may not have worked properly, though I can run NCO commands from the command line.
Any idea what the problem may be?
python typeerror netcdf nco pynco
I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to initialize an object.
Here are the commands I'm using:
from nco import Nco
nco = Nco()
And the error is:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:Python27ArcGIS10.5libsite-packagesnconco.py", line 54, in __init__
self.NCOpath = os.path.split(which('ncks'))[0]
File "C:Python27ArcGIS10.5libntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:Python27ArcGIS10.5libntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
This suggests to me that the install may not have worked properly, though I can run NCO commands from the command line.
Any idea what the problem may be?
python typeerror netcdf nco pynco
python typeerror netcdf nco pynco
asked Nov 11 at 0:39
user1816413
1
1
1
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52
add a comment |
1
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52
1
1
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244808%2ftypeerror-when-initializing-nco-object-using-python-pynco%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The fork of pynco you link is 2 years old. I'd try the original at github.com/nco/pynco and as they suggest use the Conda install.
– Eric Bridger
Nov 11 at 20:25
Thanks, Eric Bridger. I'll give that a go.
– user1816413
Nov 13 at 22:52