GithubHelp home page GithubHelp logo

Comments (16)

imradhakrishnan avatar imradhakrishnan commented on June 6, 2024 3

I am using Django 1.11.6 with django-cas-ng 3.5.1, python-cas 1.1.0. I am still facing this issue. Any help is appreciated. Thanks!

from django-cas-ng.

mhcesped avatar mhcesped commented on June 6, 2024 2

I was having this problem too. To fix it I had to uninstall python-cas, django-cas-ng and django-cas-client, then I re-installed django-cas-ng and it was solved ... surely there is some incompatibility with django-cas-client.

Hope this help.

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

python-cas==1.1.0 is listed in the requirement.txt file
It is available via pip or here https://github.com/python-cas/python-cas

from django-cas-ng.

wcc526 avatar wcc526 commented on June 6, 2024

I have try install python-cas,but it is still failure. Does it django-cas-ng is a runable project?

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

I run it on production without any troubles. I've installed both python-cas and django-cas-ng from git repository with a sudo make install.
How are you installing it ? from pip ?

from django-cas-ng.

VDaric avatar VDaric commented on June 6, 2024

Hello,

I installed django-cas-ng with pip.

I first got the same error as wc526 : ImportError: cannot import name CASClient.
After a modification in django_cas_ng/utils.py file (#72). [replacing "from cas import CASClient" by
"from caslib import CASClient"] and I installed caslib (from pip) but I am still having an error.

This time it seems to be caslib related problem :
...lib/python3.4/site-packages/caslib/init.py", line 21, in
from cas_dance import *
ImportError: No module named 'cas_dance'

I replaced "from cas_dance import *" in caslib/init.py with from caslib.cas_dance import *

This time I got :

message = 'CAS got an INVALID TICKET %r' % ticket ^
TabError: inconsistent use of tabs and spaces in indentation

cas_dance file is messing tabs & spaces.....

Feels like I am living a Never nding story ... caslib is not Python3 compliant.

Here is (a part of) my pip freeze output:
caslib==0.3.1
django-cas-ng==3.5.1
python-cas==1.1.0

I am running Django==1.8.6 with Python3.4.3.

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

This project do not use caslib. python-cas provide the cas module used by the statement from cas import CASClient https://github.com/python-cas/python-cas/blob/master/cas.py#L26

┬────────────────────────────────┬──────────────────────────────────────────────
│ 16:52, jeudi 19 novembre 2015  │
└────────────────────────────────┘

─( 16:52:30 )─< ~ >───────────────────────────────────────────────────────[ 0 ]─
valentin@nashi $ mktemp -d
/tmp/tmp.LcmGsEc5y4
─( 16:52:32 )─< ~ >───────────────────────────────────────────────────────[ 0 ]─
valentin@nashi $ virtualenv /tmp/tmp.LcmGsEc5y4
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/tmp.LcmGsEc5y4/bin/python2
Also creating executable in /tmp/tmp.LcmGsEc5y4/bin/python
Installing setuptools, pip...done.
─( 16:52:38 )─< ~ >───────────────────────────────────────────────────────[ 0 ]─
valentin@nashi $ . /tmp/tmp.LcmGsEc5y4/bin/activate
─( 16:52:46 )─< ~ >───────────────────────────────────────────────────────[ 0 ]─
valentin@nashi $ pip install python-cas django-cas-ng
Downloading/unpacking python-cas
  Downloading python-cas-1.1.0.tar.gz
  Running setup.py (path:/tmp/pip-build-GbfB_r/python-cas/setup.py) egg_info for package python-cas
    WARNING: '.' not a valid package name; please use only.-separated package names in setup.py

    package init file '__init__.py' not found (or not a regular file)
Downloading/unpacking django-cas-ng
  Downloading django-cas-ng-3.5.1.tar.gz
  Running setup.py (path:/tmp/pip-build-GbfB_r/django-cas-ng/setup.py) egg_info for package django-cas-ng

Downloading/unpacking six (from python-cas)
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking Django>=1.5 (from django-cas-ng)
  Downloading Django-1.8.6-py2.py3-none-any.whl (6.2MB): 6.2MB downloaded
Installing collected packages: python-cas, django-cas-ng, six, Django
  Running setup.py install for python-cas
    WARNING: '.' not a valid package name; please use only.-separated package names in setup.py
    package init file '__init__.py' not found (or not a regular file)

  Running setup.py install for django-cas-ng

Successfully installed python-cas django-cas-ng six Django
Cleaning up...
─( 16:53:03 )─< ~ >────────────────────────────────────────────────────────────────────────────────[ 0 ]─
valentin@nashi $ python -c "import cas; print cas.__file__"
/tmp/tmp.LcmGsEc5y4/local/lib/python2.7/site-packages/cas.pyc

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

However, it could be nice to have pip to auto install python-cas on django-cas-ng install.
@mingchen maybe add python-cas in the install_requires of setup.py ?
I do not known how pip handle dependencies.

from django-cas-ng.

bgroff avatar bgroff commented on June 6, 2024

If python-cas is in the install_requires, pip should grab and install it when installing django-cas-ng. I agree that python-cas should be installed when installing django-cas-ng.

from django-cas-ng.

mingchen avatar mingchen commented on June 6, 2024

Added python-cas to install_requires.

from django-cas-ng.

wcc526 avatar wcc526 commented on June 6, 2024

@VDaric I suggest you use the https://bitbucket.org/cpcc/django-cas this repo,It's more stable,If you have any problem you can contact with me by gmail. wcc526#gmail.com

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

@wcc526 @VDaric It will depend of the features you needs. Among those supported by django-cas-ng not supported by django-cas :

  • support of CAS 3.0: i.e. be able to use attributes transmitted by the CAS
  • support of Single Sign Out (login-out from the CAS (from anywhere) will cause a logout from django)
  • be able to emit proxy ticket to allow django to login to some backends (I use it to login to an XMPP server in prebind mode and to users ftp accounts with a web interface)

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

Also note that the split between django-cas-ng and python-cas is very recent (it was a single project until 2c046f1) thus it's not odd the see some packaging issues.

Thanks for reporting.

from django-cas-ng.

VDaric avatar VDaric commented on June 6, 2024

Everything works nice now. I just "pip installed" python-cas.

Thanks !

from django-cas-ng.

JohnnyZ avatar JohnnyZ commented on June 6, 2024

I am using DJango 1.11.6 with cas-ng 3.5.1 and python-cas 1.2 and also still have this issue.

@imradhakrishnan - did you find a solution?

from django-cas-ng.

caixinglobus avatar caixinglobus commented on June 6, 2024

I was having this problem too. To fix it I had to uninstall python-cas, django-cas-ng and django-cas-client, then I re-installed django-cas-ng and it was solved ... surely there is some incompatibility with django-cas-client.

Hope this help.

helps a lot!

from django-cas-ng.

Related Issues (20)

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.