magnuswatn / certsrv

A Python client for the Microsoft AD Certificate Services web page
MIT License
79 stars 26 forks source link

Stupid error with Certsrv #16

Closed RFC1920 closed 4 years ago

RFC1920 commented 4 years ago

On Centos6 running either python 2.75 or 3.6.8, I get the following error. ImportError: cannot import name Certsrv

If I change the line to "from certsrv import *" I get:

NameError: name 'Certsrv' is not defined

I am going by the example at https://certsrv.readthedocs.io/en/latest/certsrv.html.

magnuswatn commented 4 years ago

That does indeed sound like a stupid error.

How did you install certsrv? What version do you have (import certsrv then certsrv.__version__)?

RFC1920 commented 4 years ago

I guess it helps not to call your test file certsrv.py. I renamed it. On to another fun error:

ImportError: bad magic number in 'certsrv': b'\x03\xf3\r\n'

RFC1920 commented 4 years ago

Never mind, got it sorted I think. Deleted the pyc files and am on to a hopefully simple fix for untrusted cert. Thanks!

RFC1920 commented 4 years ago

Was my fault for duplicating the module name as my script. Still having issues but not your fault.