Coder Social home page Coder Social logo

Comments (9)

vmihailenco avatar vmihailenco commented on May 28, 2024

I believe it is possible if you configure logging for pybrake - see https://github.com/airbrake/pybrake/blob/master/pybrake/utils.py#L5 and https://docs.python.org/3/library/logging.html

from pybrake.

srininara avatar srininara commented on May 28, 2024

This does not seem to be a logging issue. If the docker image does not contain .git folder contents in it (because of .dockerignore), then the init of Notifier class raises an exception because the HEAD file is not present. This breaks pybrake initialization itself. Is it possible to change pybrake such a way that it does not require the HEAD file?

from pybrake.

vmihailenco avatar vmihailenco commented on May 28, 2024

What exception is thrown in your case?

from pybrake.

srininara avatar srininara commented on May 28, 2024

pybrake - ERROR - get_git_revision failed: [Errno 2] No such file or directory: '/<project_name>/.git/HEAD

This is through from Notifier init method and hence the notifier initialization fails and hence cannot be used any more.

from pybrake.

vmihailenco avatar vmihailenco commented on May 28, 2024

That looks like a log message from pybrake logger. Besides it should disappear if you upgrade to v0.4.0, but it is still in beta.

from pybrake.

srininara avatar srininara commented on May 28, 2024

Not sure it is from the logger. I think the place where this breaks is this:

with open(head_file) as f:

And the call from notifier to this happens from here:
rev = get_git_revision(git_dir)

Just want to confirm if this is already fixed in v0.4.0. Also please let me know when will the version be out of beta and into GA?

from pybrake.

vmihailenco avatar vmihailenco commented on May 28, 2024

Those exceptions should be handled in

pybrake/pybrake/git.py

Lines 11 to 13 in 9693af1

except (OSError, IOError) as err:
logger.error("get_git_revision failed: %s", err)
return None

We still need more time to release v0.4

from pybrake.

gabelimon avatar gabelimon commented on May 28, 2024

Can we get this ticket reopened? I'm seeing the same error on heroku. It would be nice if it would pick up the SOURCE_VERSION

from pybrake.

vmihailenco avatar vmihailenco commented on May 28, 2024

It is better to make sure you are using the last version and open a new issue with as much details as possible.

from pybrake.

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.