stanford-rc / sh_ood-apps

Open OnDemand apps for Sherlock
GNU General Public License v3.0
17 stars 11 forks source link

ImportError: cannot import name 'ForbiddenResource' from 'twisted.web.error' #8

Open brandon-biggs opened 2 years ago

brandon-biggs commented 2 years ago

Hi,

It appears that the twisted package may have changed a little bit since authrevproxy.py was written. When installing versions of Twisted at least >= 20.3.0, I was getting the error

File "authrevproxy.py", line 14, in <module>
    from twisted.web.error import ForbiddenResource
ImportError: cannot import name 'ForbiddenResource' from 'twisted.web.error'

The solution to this seemed to be to update where ForbiddenResource was being imported from. It appears that it now needs to be imported from twisted.web.resource instead of twisted.web.error. Here is the file that led me to this solution - https://github.com/twisted/twisted/blob/trunk/src/twisted/web/resource.py

Hopefully this helps if someone else runs into a similar issue.

sorenwacker commented 11 months ago

Thanks that was helpful.

I now can run Tensorboard in OOD, but I am actually getting this:

Forbidden Resource Sorry, resource is forbidden.

Seems I am still missing some configuration.