Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:55:49+00:00 2026-05-27T09:55:49+00:00

My teacher put up a large data in the school server and gave me

  • 0

My teacher put up a large data in the school server and gave me a piece of code to open up the files. Below is my code:

import sys
sys.path.append("/Data/Data123/.local/lib/python2.7/site-packages")

from cloud.common import get_tile
from scipy.io import netcdf_file as copen
from scipy import interpolate
import matplotlib
from matplotlib import pyplot as pp
import matplotlib.cm as cm
import numpy    

path = '/Data/a'

filenames = ['Hello.nc']

But when I run the code, it says there is “No such file or directory :’Hello.nc’

I am sure files are in that directory. So I want to ask, what did I do wrong?
Or am I not even collecting to the directory?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:55:50+00:00Added an answer on May 27, 2026 at 9:55 am

    It would be very difficult to answer this question without knowing what files are on the server and also looking at the code that actually connects, and attempts to retrieve the file; but I can provide you with this suggestion.

    Use os.path instead of declaring a literal path string. For example:

    Change:

    path = '/Data/a'
    

    To:

    import os
    path = os.path.join(r'/Data', 'a')
    

    Then, when you concatenate path with a filename, use os.path.join again:

    os.path.join(path, filenames[0]) # Modify to fit your filenames loop accordingly
    

    The problem may be in the way you combine path with a filename. If this does not help, please add more code or double check the server to make sure the file is there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My teacher gave out a practice exam on java recently and I'm curious to
Background : An art teacher once gave me a design problem to draw a
I read my teacher's code, but I don't understand. Could anyone please tell me
all! On our server we have got a directory 'files' with materials for students
Teacher in class gave this formula w = x**2 + y**2 - z**2 and
Today at school the teacher asked us to implement a duplicate-deletion algorithm. It's not
I need to put to parameter in DATA , how can I do this
My teacher asked me to do a program using execlp that will do the
My teacher told us that there is a default class in Java for binary
My teacher and I are having a debate about whether it is possible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.