I am trying to do the initial steps of creating a Python script using ezsheets. In their manual, they suggest that you run the script with just import ezsheets and nothing else so that you can do the API authorization before you move forward.
I am stuck there. Does anyone know why I can't finish the authorization?
Here is literally all of my configuration.
import ezsheets
import os
Here is what happens when I run the Python script.
A tab is opened and I choose a google account.
I allow the script to "See, edit, create, and delete your spreadsheets in Google Drive"
I get a message saying I can't connect to localhost:8080
I looked around here and found someone who suggested running python -m SimpleHTTPServer 8080 --bind 127.0.0.1 but that hasn't helped. When I do that I get the following messages in the terminal.
127.0.0.1 - - [22/Oct/2020 15:53:58] "GET /?state=O1Db0mYPwVjU7veAmqiP8JBhTontLw&code=4/5gEFgsaDX0-7nGYfGmLEzuJxympuGyvlq0cJF5A7i4b4E-1fO1qvmFyK2_2BkI9bZU0czi4W5k980r_mIdbulWo&scope=https://www.googleapis.com/auth/spreadsheets HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2020 15:53:58] code 404, message File not found
127.0.0.1 - - [22/Oct/2020 15:53:58] "GET /favicon.ico HTTP/1.1" 404 -
Some notes:
I have created an OAuth 2.0 Client ID.
The user type is internal.
I am part of a G Suite. I have added the ID to G Suite and allowed all of the expected API calls.
The installed library versions are
EZSheets 2020.10.10
google-api-core 1.23.0
google-api-python-client 1.12.4
google-auth 1.22.1
google-auth-httplib2 0.0.4
google-auth-oauthlib 0.4.1
googleapis-common-protos 1.52.0
Help would be appreciated.
Related
I followed the instructions here: https://dashboard.plaid.com/overview/sandbox.
I have everything setup the way it should, my .env looks like this:
PLAID_CLIENT_ID=myclientid
PLAID_SECRET=mysandboxsecret
PLAID_ENV=sandbox
PLAID_PRODUCTS=auth,transactions
PLAID_COUNTRY_CODES=US,CA
PLAID_REDIRECT_URI='http://localhost:3000/'
I did try leaving URI blank as well - made no difference.
For some reason, I continue to get this error when I visit http://localhost:3000 after running npm start
Unable to fetch link_token: please make sure your backend server is running and that your .env file has been configured correctly.
The error code, error type, and error message are all blank.
Here are the terminal outputs for ./start.sh & npm start
./start.sh
* Serving Flask app "server" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)
127.0.0.1 - - [22/Feb/2022 20:05:45] "POST /api/info HTTP/1.1" 200 -
127.0.0.1 - - [22/Feb/2022 20:05:45] "POST /api/create_link_token HTTP/1.1" 200 -
npm start
> plaid_react_quickstart#0.1.0 start
> react-scripts start
[HPM] Proxy created: / -> http://localhost:8000
ℹ 「wds」: Project is running at http://192.168.1.45/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /Users/user/plaid/quickstart/frontend/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
Compiled with warnings.
src/dataUtilities.ts
Line 11:3: 'AssetReportGetResponse' is defined but never used #typescript-eslint/no-unused-vars
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
Does anyone familiar with Plaid API know how to fix this?
It feels like the API/quickstart process has changed a bit since those postings.
EDIT:
I re-cloned the repo and started from step 1 and re-did everything. It all works now. I traced the issue back to an extra digit at the end of my SECRET. Thank you Alex for the help, but it was all a silly mistake. Cheers!
You can always get more data about what went wrong by looking at the activity log at https://dashboard.plaid.com/activity/logs. That said, the most common causes of this issue are the following:
Specifying a REDIRECT_URI in the .env file but not adding it to "allowed redirect uris" at https://dashboard.plaid.com/team/api
Being on Windows and not cloning the repo in a manner that preserves symlinks, which you can do like this:
git clone -c core.symlinks=true https://github.com/plaid/quickstart
try this answer as well, seems like python3.9 certificates are missing for mac os
https://stackoverflow.com/a/68595419/6013354
I generated python server stub from swagger-codegen at swagger editor online, and I want to run generated python server stub locally but it is not working and endpoint gave me Not Found error. I looked into swagger community, and not find single piece of issue related to this. Basically, I used openapi spec in yaml file to generate python server stub, but generated server stub can't be run locally. I don't know what is going on. Is there anyone experienced with this issue? what's the right way to generate python server stub from swagger-codegen which can be run and test locally? any idea?
openapi spec file
here is how yaml file begins:
openapi: 3.0.2
info:
title: api
description: test api
contact:
name: python server
url: /api/v1/
email: info#gmail.com
version: 1.0.0
servers:
- url: /api/v1/
description: SwaggerHub API Auto Mocking
- url: /api/v1/
description: IMM AWS Server 1
I generated python server stub by using this yaml file but generated python server stub is not working and can't run locally from python console/cmd. any idea to make this work? any possible thought?
update
here is what I tried:
venv) C:\Users\kim\photoalbum_api>python -m swagger_server
The swagger_ui directory could not be found.
Please install connexion with extra install: pip install connexion[swagger-ui]
or provide the path to your local installation by passing swagger_path=<your path>
The swagger_ui directory could not be found.
Please install connexion with extra install: pip install connexion[swagger-ui]
or provide the path to your local installation by passing swagger_path=<your path>
* Serving Flask app "__main__" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
so I did pip install connexion[swagger-ui] and try to run it locally, but endpoint always gave me this:
for reproducible purpose, I also tested this openapi spec file to generate python server stub but it is not working as well. why? any idea to make this work? thanks
new update:
even I tried with http://localhost:8080/, endpoint always give me this:
(venv) C:\Users\kim\photouser_api>python -m swagger_server
* Serving Flask app "__main__" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 198-543-983
* Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
127.0.0.1 - - [16/May/2020 12:13:51] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [16/May/2020 12:14:02] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [16/May/2020 12:14:05] "GET /api HTTP/1.1" 404 -
127.0.0.1 - - [16/May/2020 12:14:10] "GET /api/v1 HTTP/1.1" 404 -
127.0.0.1 - - [16/May/2020 12:14:14] "GET /api/v1/ HTTP/1.1" 404 -
127.0.0.1 - - [16/May/2020 12:15:14] "GET / HTTP/1.1" 404 -
To get it working in my machine, I cloned your repo openapi.yaml. Then I modified the url to /api/v1/ in your openapi.yaml, and change the connexion to 2.6.0 in your requirements.txt. I created virtualenv and I followed the instructions in the README.md to install requirements.txt, and ran it. In the browser, I type http://localhost:8080/api/v1/ui and this should show the swagger ui. I also tried the docker build instruction and this also works.
I've just upgraded Nexus to 3.8.0-02 OSS to get Python Pypi support.
I've created a pypi-hosted and a pypi-proxy and an additional pypi-group to merge them. I've given myself all roles related to those repositories. All works fine in the UI and pip can query that proxy repository just fine (no credentials).
Problem is I cannot publish from setuptools in python. My ~/.pypirc mode 0600 and contains:
[distutils]
index-servers =
nexus
[nexus]
repository: https://ld3-nexus-3-kev.pibenchmark.com:8443/nexus/repository/pypi-hosted/
username: kevin_thorpe
password: XXXXXXX
This username and password works just fine for Maven so I know it's not that. If I do python setup.py register -r nexus then I get a 401 response. Same results using twine as in the docs. Oddly there's nothing logged on what is obviously a failed login. Traffic is going to the server but I can't see what's in the packets. I've tried both my LDAP user and a local usr with the same results.
How do I go about debugging the problems with the connection? It appears to only be python that's the problem
I can reproduce the error with:
python3 setup.py register -r myserver
In request.log:
10.255.0.3 - - [16/Feb/2018:19:12:51 +0000] "POST /nexus/repository/pypi/ HTTP/1.1" 401 0 3 "Python-urllib/3.6"
Mind the second - should be the username but NONE gets there.
Output example using curl:
curl -u admin -X POST https://my_awesome_nexus_server/nexus/repository/pypi/:
10.255.0.3 - admin [16/Feb/2018:19:14:45 +0000] "POST /nexus/repository/pypi/ HTTP/1.1" 500 1948 15 "curl/7.55.1"
Tested on Docker Container, latest (3.8), and 3.7. It seems to me that problem is at client side instead.
UPDATE:
Managed to make it work with twine (in a virtualenv):
python3 setup.py build
twine upload -r myserver dist/mypackage-0.1.0.tar.gz
And it is available at Nexus3 (3.7).
My suggestion for troubleshooting is to look at the nexus.log and request.log for more detailed log statements. These can be found in your data directory in the "log" subdirectory.
Another option is to file a ticket in https://issues.sonatype.org/projects/NEXUS/ and see if the Sonatype staff have any more ideas. It would be helpful if you include a support.zip (documented here: https://help.sonatype.com/display/NXRM3/Support+Features#SupportFeatures-CreatingaSupportZIP) which will include the logs when you do this.
I apologize for the somewhat generic advice but I see nothing wrong with your configuration from your post details so far.
I'm running the Openstack Cloud System. I installed and deployed the kilo version on the server successful, but this is only the default version of Openstack. So that, I want to have some modifies on this openstack source and add more features to it.
I started to change something with the Openstack Dashboard. However, there are some problems happened. Therefore, I have debugged this django web application. All everything I have configured is the same as the official tutorials on the openstack website (http://docs.openstack.org).
So, I have search on my server and find out 2 places that have the sources:
The first one is /usr/share/openstack-dashboard/
The second one is /usr/lib/python2.7/dist-packages/horizon/
And the config file is /etc/openstack-dashboard/local_settings.py
I set the option Debug = True in local_settings.py file.
On the server I typed these commands:
cd /usr/share/openstack-dashboard/
python manage.py runserver
Here is the output:
RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
WARNING:py.warnings:RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
WARNING:py.warnings:RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
Performing system checks...
System check identified no issues (0 silenced).
August 05, 2015 - 09:28:50
Django version 1.7.6, using settings 'openstack_dashboard.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
But in the browser, it shows the error:
And then, on the console, it shows:
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[05/Aug/2015 10:21:29] "GET / HTTP/1.1" 302 0
Not Found: /horizon/auth/login/
[05/Aug/2015 10:21:29] "GET /horizon/auth/login/?next=/ HTTP/1.1" 404 4237
Not Found: /favicon.ico
[05/Aug/2015 10:21:29] "GET /favicon.ico HTTP/1.1" 404 4206
Please help me to get out of this problems. And how can to debug Openstack Django Website properly.Thank you very much !
As you run server by runserver command you should go to the root url like
127.0.0.1:8000/
not
127.0.0.1:8000/horizon
The difference is in running method.
When you installed openstack_dashboard there is apache config that listen to address http://host/horizon look in to /etc/apache2/conf/sites-available/
The directories
/usr/lib/python2.7/dist-packages/horizon/
Is like the framework for all dashboards
/usr/share/openstack-dashboard/
Is the default dashboard for openstack
/etc/openstack-dashboard/local_settings.py
The config file for dashboard. Here you can apply changes for default dash, for example attach your project that modifies or extends default dash
So, your problem will be solved if you follow that link http://127.0.0.1:8000/
For debugging use
pdb or ide with integrated debugger
Follow this link.
http://docs.openstack.org/developer/horizon/quickstart.html
Once this is done, add pdb statements to your code that you wish to debug.Go into the horizon folder and run the following command
./run_tests.sh --runserver 127.0.0.1:port_number
Instead of local host you can put in the IP address where horizon is running
I have written the OpenStack documentation for debugging dashboards using PyCharm.
(It is good for any Openstack Dashboard including Horizon)
http://docs.openstack.org/developer/mistral/developer/troubleshooting.html
I'm trying to make a web app using the Uber api (https://developer.uber.com/v1/tutorials/).
In their tutorial they link to an example application on github with instructions to get it running. (https://github.com/uber/Python-Sample-Application). When I try running the sample application I get HTTP 400 errors. An example of the output that I get on the console is shown below.
(venv)192:Python-Sample-Application jason$ python app.py
* Running on http://127.0.0.1:7000/
127.0.0.1 - - [05/Sep/2014 05:37:28] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\xab\x01\x00\x00\xa7\x03\x03T')
127.0.0.1 - - [05/Sep/2014 05:37:28] "??T ??p},֤,??IknL?]????????C#?J??$?#?" 400 -
127.0.0.1 - - [05/Sep/2014 05:37:28] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\x9b\x01\x00\x00\x97\x03\x01T')
127.0.0.1 - - [05/Sep/2014 05:37:28] "??T ???=?-???????"u?Pg,??t?sBa`?J??$?#?" 400 -
127.0.0.1 - - [05/Sep/2014 05:37:28] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x00\x00E\x01\x00\x00A\x03\x00T')
127.0.0.1 - - [05/Sep/2014 05:37:28] "EAT ??^??????<)?W?e-???\?U~?0:=?=</5" 400 -
I've pasted the instructions from the github project below.
How To Use This
Navigate over to https://developer.uber.com/, and sign up for an Uber developer account.
Register a new Uber application and make your Redirect URI http://localhost:7000/submit ensure that both the profile and history OAuth scopes are checked.
Fill in the relevant information in the config.json file in the root folder and add your client id and secret as the environment
variables UBER_CLIENT_ID and UBER_CLIENT_SECRET.
Run export UBER_CLIENT_ID="YOUR_CLIENT_ID"&&export UBER_CLIENT_SECRET="YOUR_CLIENT_SECRET"
Run pip install -r requirements.txt to install dependencies
Run python app.py
Navigate to http://localhost:7000 in your browser
On the Uber developer page I've checked all boxes for my app and set the redirect. In my config.json, I've added lines for the UBER_CLIENT_ID and UBER_CLIENT_SECRET fields. I've run the export command from step 4 and echoed both environment variables to confirm that the variables are set. I created a virtualenv to install the dependencies and then ran the pip install and python app.py instructions. I'm running OS x and have tried with both Chrome and Safari and both browsers say they fail to make a secure connection to localhost.