Giter Site home page Giter Site logo

scripts's People

Contributors

chris3torek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tcluri

scripts's Issues

githash.py - TypeError: can't concat bytes to str

λ python githash.py zds-site
Traceback (most recent call last):
  File "githash.py", line 209, in <module>
    sys.exit(main())
  File "githash.py", line 195, in main
    hasher = generic_hash(path, mode, size, args)
  File "githash.py", line 169, in generic_hash
    hasher = tree_hash(path, args)
  File "githash.py", line 138, in tree_hash
    pass1.sort(key = lambda i: i[4] + '/' if i[1] == '40000' else i[4])
  File "githash.py", line 138, in <lambda>
    pass1.sort(key = lambda i: i[4] + '/' if i[1] == '40000' else i[4])
TypeError: can't concat str to bytes

Fix : .encode('ascii')

 pass1.sort(key = lambda i: i[4] + '/'.encode('ascii') if i[1] == '40000' else i[4])

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32

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.