SystemRage / py-kms

KMS Server Emulator written in Python
The Unlicense
2.04k stars 618 forks source link

SQLite errors #31

Closed speedst3r closed 5 years ago

speedst3r commented 5 years ago

I came across a couple of errors running pykms_Server with SQLite - don't have the actual errors anymore but you could probably replicate them.

  1. 'os' is not defined, pykms_Sql.py, line 17. - Added 'import os', 7e40ba6
  2. 'self' is not defined, pykms_Sql.py line 78. - removed 'self' from the connection reference, 5441771
speedst3r commented 5 years ago

Command line to launch py-kms:

/usr/bin/python3 pykms_Server.py 0.0.0.0 1688 -l 1033 -c 26 -a 120 -r 10080 -s -w RANDOM -V INFO -F /var/log/pykms_server.log
elekgeek commented 5 years ago

thanks for the command, but there are a couple of errors in the code, in file pykms_Sql.py as follows:

add import os at the beginning of this file, right after #!/usr/bin/env python3 and at line 78, modify: con = sqlite3.connect(self.dbName) to con = sqlite3.connect(dbName)

this should solve your issue.

speedst3r commented 5 years ago

Yeah - it's my PR (#32) with these fixes (and the commits in the issue opening post from my fork), before taking it out of draft I wanted it confirmed that it was an issue and not something in my environment.

elekgeek commented 5 years ago

sorry man, I did not read your first msg and thought you were looking for the solution, my bad..

Any way, I tested it with office 2019 and it works ok with the fix :)

speedst3r commented 5 years ago

No worries. I have a CI pipeline that builds a Docker image, currently the Dockerfile is using my fork, once the PR is merged I can submit a PR for my updated Dockerfile and start.sh, and can revert to using the upstream repo :)

SystemRage commented 5 years ago

Many thanks for debug and contributing.