Comments (5)
Hi @dkraynak, thanks for trying our code!
It seems that the code doesn't find your keyfile (keys.yaml
). The project is currently not a library that you can install and use in any place - it expects to find the file in the project directory. So the easiest thing is to place your keys.yaml
in the same directory as the .py files. Once you did that, you should be able to use both
import examples
as well as
import twitter_auth
twitter_auth.authorize(filepath="keys.yaml")
You can even try that with empty credentials, in which case you'll at least get a different error:
touch keys.yaml
python
import examples
>>> import examples
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/p/projects/twitterresearch/examples.py", line 16, in <module>
import rest
File "/Users/p/projects/twitterresearch/rest.py", line 52, in <module>
auth = twitter_auth.authorize()
File "/Users/p/projects/twitterresearch/twitter_auth.py", line 67, in authorize
auth_object = OAuth1Session(client_key=keys["client_key"],
TypeError: 'NoneType' object is not subscriptable
If you still get an error from next(), you may be using python 2 - try python version 3 instead.
Does any of this work for you?
from twitterresearch.
Fixed: We now throw a somewhat more helpful Exception on a missing keyfile 43faba6
from twitterresearch.
Hi thanks for this timely response!
I followed your suggestions and tinkered a bit - ultimately what worked for me was just slightly altering the find_keyfile() function to search for 'keys.yaml.template' once it was in the proper directory. I was very surprised that change had an effect but that is what seems to have done it.
Sorry but now I'm having some trouble with peewee... for some reason the import is not having trouble finding the peewee module. When I go back and try to reinstall ...
running install
... (several creating/copying commands)...
copying playhouse\test_utils.py -> build\lib.win-amd64-3.5\playhouse
copying playhouse__init__.py -> build\lib.win-amd64-3.5\playhouse
running build_ext
cythoning playhouse/speedups.pyx to playhouse\speedups.c
building 'playhouse._speedups' extension
error: Unable to find vcvarsall.bat
Failed building wheel for peewee
Running setup.py clean for peewee
Failed to build peewee
Installing collected packages: peewee, progress
Running setup.py install for peewee ... error
Any further advice would be greatly appreciated! thanks
from twitterresearch.
Glad you got it working. The peewee issue stems from your Python install. It probably fails to compile the module. I don't have much experience with Windows, you might fare better with using Anaconda Python.
from twitterresearch.
Closing since the original issue is resolved.
from twitterresearch.
Related Issues (17)
- retweet_links is slow
- examples.save_track_keywords() write() argument error HOT 1
- Unicode Issue on Windows Machines when Exporting Top Retweets from Database HOT 2
- Error Messages: Better Descriptives and More Prominent Position HOT 1
- Rest API keyword search and extraction HOT 7
- Avoid incomplete tweets when querying Twitter's Streaming APIs HOT 1
- Persistent Error in the use of import.json() HOT 1
- New Error Arising from deduplicating input in database import HOT 1
- Youtube link seems to be the wrong video: has nothing to do with time zones HOT 1
- Setup on a Raspberry Pi 3 HOT 6
- Error after one successful week on downloading HOT 3
- 'bool' object is not iterable HOT 2
- IrrecoverableStreamException error HOT 3
- Keep track of credential use count
- examples.export_retweet_text() is throwing a peewee error. Unsure how to debug. HOT 4
- examples.print_user_archive() 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 twitterresearch.