Is this from a notebook? Maybe see what information is given at the URL given by job.url
Your post might have come through with some formatting attached so not sure if this is the same but this works for me
from lsst.rsp import get_tap_service, retrieve_query
service = get_tap_service("tap")
assert service is not None
query = "select TOP 10 "\
"obj.objectId as objectId "\
"FROM dp1.Object as obj "
print(query)
job = service.submit_job(query)
job.run()
job.wait(phases=['COMPLETED', 'ERROR'])
print('Job phase is', job.phase)
results = job.fetch_result().to_table().to_pandas()
print(results)
Yes, I am using a jupyter notebook, but sorry I don’t understand where to find job.url.
I was at a tutorial session. I followed exactly what the lecturer provided, but it failed.
The lecturer checked and found the exact same code that can work on his machine can not work on mine. He could not figure out why.
I try to show the exact code and the file he prepared below.
from lsst.rsp import get_tap_service, retrieve_query
from astropy.table import Table
from astropy.io import fits
import pandas as pd
import matplotlib.pyplot as plt
pd.set_option(‘display.max_rows’, 50)
service = get_tap_service(“tap”)
assert service is not None
we have uncovered an error with temporary table uploads for usernames that include a dash in them (you are jijia-tang I believe). We’re working on a fix and it will be available by Thursday’s upgrades at the latest.
Really sorry about that. I will let you know when I expect this to work.