Comments (7)
can you try calling identify? want to make sure it's not a typo :)
otherwise, can you first enable analytics.debug = True
and then copy the output?
from analytics-python.
Getting this too:
>>> import analytics
>>> analytics.write_key = 'xxxxx'
>>> analytics.debug = True
>>> user_id = 21
>>> analytics.track(user_id, "Completed Order", {'price': 50})
No handlers could be found for logger "segment"
from analytics-python.
I was getting the same error and I just figured out what was going on by using the development settings in the documentation:
https://segment.com/docs/libraries/python/#development-settings
Then I realized the mistake I was making.
Hope this helps.
def on_error(error, items):
print("An error occurred:", error)
import analytics
analytics.debug = True
analytics.on_error = on_error
from analytics-python.
Closing for now, let me know if I should re-open!
from analytics-python.
@calvinfo can you please reopen this one.
import analytics
print analytics.__version__
analytics.write_key = "XXX"
def on_error(error, items):
print("An error occurred:", error)
analytics.debug = True
analytics.on_error = on_error
analytics.track('019mr8mf4r', 'Made a Comment', {
'that_aided': 'No-One',
'comment': 'its 4AM!'
})
gives me the same error:
No handlers could be found for logger "segment"
1.1.0
from analytics-python.
Hey @salvador-dali you'll need to add a handler for the segment logger to get it to output messages properly. We should add it to our docs as well, but in that case it likely means that your call went through successfully. If you call analytics.flush()
you should be guaranteed to see it.
To get rid of the handler message, do something like this:
import logger
log = logging.getLogger('segment')
log.addHandler(...)
Where you add whatever your handler is.
from analytics-python.
@calvinfo thanks for a quick reply. This solved my problem.
from analytics-python.
Related Issues (20)
- Improve error handling HOT 1
- Change in date format for originalTimestamp HOT 1
- Import analytics clash with standard library module HOT 3
- `import analytics` broken in 2.2.1 HOT 1
- Documentation site is outdated and not aligned with the latest README HOT 1
- Invalid base class for APIError
- Incorrect SQL test generated from Parameter with default_value HOT 4
- The lib analytics in Databricks not delivery 100% of calls HOT 7
- Issue: Messages are getting dropped sometimes and not pushed to segment. HOT 2
- Deprecate unmaintained PyPI package HOT 2
- Convert to Github Actions
- Python 3.10 and 3.11 support HOT 5
- [FEATURE REQUEST] | Context information with `track` calls HOT 1
- Successive track calls don't get logged to app.segment.com sources (Debugger)
- No Data Flowing After Upgrading to Python 3.11 HOT 1
- PyPI wheel contains old analytics package HOT 2
- Resolve Test Issues
- Version 2.3.0 missing jwt as an explicit dependency HOT 4
- Basic auth was removed from the auth methods in v2.3 HOT 1
- Segment integration with Gainsight not working from Python HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics-python.