GithubHelp home page GithubHelp logo

Comments (5)

trifle avatar trifle commented on June 2, 2024

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.

trifle avatar trifle commented on June 2, 2024

Fixed: We now throw a somewhat more helpful Exception on a missing keyfile 43faba6

from twitterresearch.

DK044 avatar DK044 commented on June 2, 2024

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.

trifle avatar trifle commented on June 2, 2024

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.

trifle avatar trifle commented on June 2, 2024

Closing since the original issue is resolved.

from twitterresearch.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.