Comments (3)
I think the problem is that google_auth_oauthlib
runs its authentication flow server on the port 8080
by default which might be occupied by something else in your system.
Try netstat -a -b -n
and check if this port is in use. If you can, quit the application that uses it. If not it would require overriding the _get_credentials
of GoogleCalendar
like so:
class GoogleCalendarOnAnotherPort(GoogleCalendar):
def _get_credentials(self):
_credentials_path = os.path.join(self._credentials_dir, self._credentials_file)
credentials = None
if os.path.exists(self._token_path):
with open(self._token_path, 'rb') as token:
credentials = pickle.load(token)
if not credentials or not credentials.valid:
if credentials and credentials.expired and credentials.refresh_token:
credentials.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(_credentials_path, self._scopes)
credentials = flow.run_local_server(port=8090) # note the port parameter. Change to any free port
with open(self._token_path, 'wb') as token:
pickle.dump(credentials, token)
return credentials
It is a workaround and should be fixed in the future version of the gcsa
.
Thank you for the issue submission.
from google-calendar-simple-api.
Perfect! That was exactly the issue, I set it to use a different port and everything is working great.
Thanks so much.
from google-calendar-simple-api.
I'll leave the issue open until it is fixed in the implementation
from google-calendar-simple-api.
Related Issues (20)
- Authentication issue: redirect_uri_mismatch HOT 3
- Check that event has id before `update`, `import`, and `move` like in `delete`.
- Support python 3.11
- Type Error: Missing required parameter "eventId" HOT 5
- ImportError HOT 2
- Hello, token expires problem HOT 1
- Support for ICS import HOT 3
- Unknown timezone error HOT 2
- Creating event doesnt generate event id HOT 1
- 'Credentials' object has no attribute 'refresh_token'. (Support service accounts) HOT 2
- Write some docs on `color`
- Issue when changing event type HOT 4
- Sign in with App Passwords? HOT 1
- Clarify get_events() docs HOT 4
- Work with the new credentials file names
- Circular Import Error HOT 2
- ModuleNotFoundError on raspberrypi HOT 7
- Add Timezone docs
- Don't use cache discovery HOT 1
- Unable to list events from non-primary calendar HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-calendar-simple-api.