Closed RandySincoular closed 8 years ago
Do you require a proxy to access the internet on your network?
Hi Mike – thanks for the quick response. We have one defined in IE.
Thanks,
Randy
You need to define the them on the proxy port and URL in the script
Hi Mike – ok, I got it. I added a proxy server and port 80. I also modified the URL of the feature service to: url = 'http://services3.arcgis.com/sqVn1QnQEPnGQy9r/arcgis/rest/services/outage_event/FeatureServer'
That did the job. I appreciate your help. It’s kind of hard trouble shooting this when you are not sure what parameters to include.
Thanks again.
Randy
Glad you figured it out. I cleaned up the communication as one of the post had an password in it.
Hi Mike – two questions:
* Remote Interpreter Reinitialized *
{u'layers': [{u'count': 16, u'id': 0}]}
Thanks again,
Randy
From: Michael Miller [mailto:notifications@github.com] Sent: Monday, April 18, 2016 3:29 PM To: Esri/ArcREST Cc: Sincoular, Randy Subject: Re: [Esri/ArcREST] Need Help With Query AGOL Service Sample (#220)
Glad you figured it out. I cleaned up the communication as one of the post had an password in it.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_ArcREST_issues_220-23issuecomment-2D211563382&d=CwMCaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=VPwuEa_rNmp_UVm0od-YvdtKnlNWqqwbpxa2Pz1fNVE&m=OwddILGUQEug8lxT5Ml2iT06bzCrz2f9ylnqi4yEjKM&s=H8iARtaAJjw_EdLwkhpP-E4wt4Mo2oK9M1tjZy71cnU&e=
The u
you see before strings makes Python treat the string as Unicode. There's other prefixes as well, most commonly r
, for making strings raw.
For example, try to print złoty in python 2.x:
>>> print('złoty')
Unsupported characters in input
>>> print(u'z\u0142oty')
złoty
>>>
Thanks Paul
From: Paul LeBlanc [mailto:notifications@github.com] Sent: Monday, April 18, 2016 3:55 PM To: Esri/ArcREST Cc: Sincoular, Randy Subject: Re: [Esri/ArcREST] Need Help With Query AGOL Service Sample (#220)
The u you see before strings makes Python treat the string as Unicodehttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.python.org_2_howto_unicode.html&d=CwMFaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=VPwuEa_rNmp_UVm0od-YvdtKnlNWqqwbpxa2Pz1fNVE&m=hx_UHiL_hGJ2x-N0C_v32FmJvDI5rhA_9Ugtk902-jg&s=UHae3G5wkwZ0F3P2fTio7PKVXGhhtLKR5kv6wWjw3lk&e=. There's other prefixes as wellhttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.python.org_2_reference_lexical-5Fanalysis.html-23string-2Dliterals&d=CwMFaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=VPwuEa_rNmp_UVm0od-YvdtKnlNWqqwbpxa2Pz1fNVE&m=hx_UHiL_hGJ2x-N0C_v32FmJvDI5rhA_9Ugtk902-jg&s=FZ0nv83RmD6KU15dwa7jA8oVl55-xs-2HE_Uq3cgxdQ&e=, most commonly r, for making strings raw.
For example, try to print złotyhttps://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Polish-5Fz-25C5-2582oty&d=CwMFaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=VPwuEa_rNmp_UVm0od-YvdtKnlNWqqwbpxa2Pz1fNVE&m=hx_UHiL_hGJ2x-N0C_v32FmJvDI5rhA_9Ugtk902-jg&s=97KcrBnZpaATQ2lWFqVhbTyoCiL2KzDlNJeTqW6KUKo&e= in python 2.x:
print('złoty')
Unsupported characters in input
print(u'z\u0142oty')
złoty
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_ArcREST_issues_220-23issuecomment-2D211571090&d=CwMFaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=VPwuEa_rNmp_UVm0od-YvdtKnlNWqqwbpxa2Pz1fNVE&m=hx_UHiL_hGJ2x-N0C_v32FmJvDI5rhA_9Ugtk902-jg&s=q2P7P1nuGNMpyA1vQi1_TiBxOiG2D5hGTQdvYtXgADI&e=
I am trying to get this sample to run. I added a URL, USERNAME and PASSWORD and this script errors out. I have a feature service in AGOL I am trying to test with. I am not sure if I need to populate some additional 'securityinfo' parameters or not.
The error I receive is: URLError: <urlopen error [errno 10060] a connection attempt failed because the party did not properly respond after a period of time...
Any thoughts would be appreciated.
Thanks,
Randy
""" Query agol service Python 2.x ArcREST 3.0.1 """
from future import print_function from arcresthelper import securityhandlerhelper from arcrest.agol import FeatureService from arcrest.common.filters import LayerDefinitionFilter
if name == "main": url = 'http://services3.arcgis.com/sqVn1QnQEPnGQy9r/arcgis/rest/services/outage_event/FeatureServer/0/query' proxy_port = None proxy_url = None