Code Monkey home page Code Monkey logo

cmu_auth's Introduction

cmu_auth

Simple Python methods for authenticating to CMU services. See auth.py for usage.

Registering with PyPi

This is mostly for maintainers, to document how to submit a package to PyPi: :

# after bumping the version number in setup.py:
$ python setup.py register sdist upload
# (you're probably going to have to answer 'y' to the .pypirc file)

License

MIT License. See LICENSE.

cmu_auth's People

Contributors

jez avatar justingallagher avatar willcrichton avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cmu_auth's Issues

cmu_auth fails to populate request URL

When requesting a page, the following traceback is given:

Traceback (most recent call last):
  File "/usr/local/bin/cmu_auth", line 4, in <module>
    __import__('pkg_resources').run_script('cmu-auth==0.1.6', 'cmu_auth')
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.5-py3.4.egg/pkg_resources/__init__.py", line 742, in run_script
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.5-py3.4.egg/pkg_resources/__init__.py", line 1667, in run_script
  File "/usr/local/lib/python3.4/dist-packages/cmu_auth-0.1.6-py3.4.egg/EGG-INFO/scripts/cmu_auth", line 28, in <module>
    s = cmu_auth.authenticate(url, username, password)
  File "/usr/local/lib/python3.4/dist-packages/cmu_auth-0.1.6-py3.4.egg/cmu_auth/auth.py", line 58, in authenticate
    s.post(parser.url, data=parser.to_post).content
  File "/home/justin/.local/lib/python3.4/site-packages/requests/sessions.py", line 511, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/justin/.local/lib/python3.4/site-packages/requests/sessions.py", line 454, in request
    prep = self.prepare_request(req)
  File "/home/justin/.local/lib/python3.4/site-packages/requests/sessions.py", line 388, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/home/justin/.local/lib/python3.4/site-packages/requests/models.py", line 293, in prepare
    self.prepare_url(url, params)
  File "/home/justin/.local/lib/python3.4/site-packages/requests/models.py", line 353, in prepare_url
    raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?

Someone using the Course-API discovered this issue (here). Here's the URLs I've tried (all failing):

https://s3.andrew.cmu.edu/sio/index.html
https://enr-apps.as.cmu.edu/audit/audit
https://cmu.smartevals.com/secure/Login.aspx

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.