I'm using Pycharm Pro - latest version

On Saturday, January 20, 2018 at 11:05:56 PM UTC+3, Richard Cheesmar wrote:
>
> Hi, kai,
>
> Chezs-MacBook-Air:google_appengine chez$ gcloud version
> Google Cloud SDK 183.0.0
> app-engine-python 1.9.64
> beta 2017.09.15
> bq 2.0.27
> core 2017.12.08
> gcloud 
> gsutil 4.28
>
>
> Chezs-MacBook-Air:google_appengine chez$ openssl version
> OpenSSL 0.9.8zh 14 Jan 2016
>
>
>
> On Saturday, January 20, 2018 at 8:04:36 PM UTC+3, Kai Wang wrote:
>>
>> Hi Richard,
>>
>>  error on the local dev machine when using googlecloudstorage to write a 
>>> file:
>>
>>
>> Which development tool were you using?   Is it GAE's dev_appserver 
>> <https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server>
>>  ?  
>> Is it gsutil <https://cloud.google.com/storage/docs/quickstart-gsutil> ? 
>> Or else?
>>
>>
>> I have some experience working on dev_appserver. AFAIK, apps running on 
>> dev_appserver have cloudstroage calls backed by a local fake. 
>> I found two docs mentioning dev_appserver with cloud storage [ 1 
>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/app-engine-cloud-storage-sample>
>> , 2 
>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage>
>> ]
>>
>> Following the doc 1, I ran the attached demo app using dev_appserver.py;
>> And hit "localhost:8080" returns:
>>
>>
>> Demo GCS Application running from Version: None.873839430855777998
>>
>> Using bucket name: app_default_bucket
>>
>> Creating file /app_default_bucket/demo-testfile
>>
>>
>> To be close to your code snippet, I especially changed main.py line 88 to:
>>
>> with cloudstorage.open(filename, 'w', content_type='binary/octet-stream', 
>> options={b'x-goog-acl': b'public-read'}) as f:
>>
>>
>> FYI, Digging into the urlfetch.py in our SDK, I found 
>> validate_certificate defaultly disabled.
>>
>>
>> For trouble shooting, please DO update this thread with as much input as 
>> possible. 
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>> On Thursday, January 4, 2018 at 5:04:40 AM UTC-8, Richard Cheesmar wrote:
>>>
>>> I'm getting the following error on the local dev machine when using 
>>> googlecloudstorage to write a file:
>>>
>>>   File "/usr/local/google_appengine/google/appengine/api/urlfetch.py", 
>>> line 467, in _get_fetch_result
>>>     'Invalid and/or missing SSL certificate for URL: ' + url)
>>> SSLCertificateError: Invalid and/or missing SSL certificate for URL: 
>>> https://accounts.google.com/o/oauth2/token
>>>
>>> import cloudstorage as gcs
>>>
>>> with gcs.open(filename, 'w', content_type=mime, options={b'x-goog-acl': 
>>> b'public-read'}) as f:
>>>     f.write(img)
>>>     f.close()
>>>
>>> This was working perfectly and there have not been any code changes.
>>> It also works on the live version. 
>>>
>>>
>>> Has anyone noticed the same?
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/31d45b62-1452-472c-9cfb-cae47814b183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to