Giter Site home page Giter Site logo

Comments (3)

ztgrace avatar ztgrace commented on August 30, 2024 1

Thanks for the bug report. So according to the Python documentation, a generator in python should always raise a StopIteration exception when there's no more values in the generator. Some built-in functions like for automatically handle this exception and terminate the loop. Since I was calling next directly, the uncaught exception gets raised. Now the crazy part is that the error and this is some of the oldest code in changeme and I'm baffled why this doesn't throw an exception all of the time and you're the first to hit this error.

Until 1.0.3 gets published, swapping line 260 with protocols = [proto for proto in os.walk('creds')][0][1] or running the development branch should fix the issue.

from changeme.

sil3ntcor3 avatar sil3ntcor3 commented on August 30, 2024

Looks like I'm getting a newish error now. I tried both the swapping line 260 with the new code and running the dev branch.

Traceback (most recent call last):
File "/opt/changeme/changeme.py", line 6, in
core.main()
File "/opt/changeme/changeme/core.py", line 48, in main
creds = load_creds(config)
File "/opt/changeme/changeme/core.py", line 260, in load_creds
protocols = [ proto for proto in os.walk('creds')][0][1]
IndexError: list index out of range

from changeme.

ztgrace avatar ztgrace commented on August 30, 2024

Ok, I can finally reproduce it (I was shooting in the dark earlier). It looks like you're running /opt/changeme/changeme.py from outside of the project directory /opt/changeme/. So if you cd /opt/changeme/ then run ./changeme.py -d PTDS_scan_1.xml it should work better for you.

I'm going to rename this issue to better reflect the issue and work on getting this resolved for the next release.

Thanks again for the bug report and troubleshooting.

from changeme.

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.