python,django,logging,sentry,ravenRelated issues-Collection of common programming errors


  • Fraz
    python
    I was trying to parse an xml file. My problem is same as this:parsing an xml file for unknown elements using python ElementTreeAnd I tried the solution of untubu.It works great. But only for the lines which have single tagsFor example:<some_root_name> <tag_x>bubbles</tag_x></some_root_name>This works great But if it is like:src = ”’\ <review type=”review”><link>http://www.openlist.com/new-york-ny/mickey-mantles/27612417/?numReviews=178</link> ”’it fail

  • Kingino
    python c git linker libgit2
    I am experiencing an odd problem every time I try the set-up of pygit2. Below is what I run and the error generated.$ python3 setup.py install running install running build running build_py running build_ext building ‘_pygit2’ extension /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -isystem /Applic

  • Codemonkey
    python wxpython
    I’ve made a runnable example that demonstrates the buggy behavior: http://pastebin.com/8KpzD4pwThis issue is EXTREMELY aggravating. I have a wx.ProgressDialog up while I’m saving a file, and upon IOError, I want to close the progress dialog and display an error message. Unfortunately, this seems to be impossible. The progress dialog blatantly refuses to close before the message box closes:As you can see, the message box appears below the progress dialog, so the user has to manually switch focus

  • Jane Wayne
    android python monkeyrunner
    i have the following python script in an attempt to take a screen shot of a device (not an emulator).import sys import timefrom com.android.monkeyrunner import MonkeyRunner, MonkeyDeviceCONNECTION_TIME_OUT = 30 deviceName = str(sys.argv[1]) pathName = str(sys.argv[2])device = MonkeyRunner.waitForConnection(CONNECTION_TIME_OUT, deviceName) result = device.takeSnapshot() result.writeToFile(pathName,’png’)i run this script at the windows command prompt as follows.monkeyrunner.bat -v ALL %SCRIPT_DIR

  • Zack
    python windows subprocess
    I have a test harness (written in Python) that needs to shut down the program under test (written in C) by sending it ^C. On Unix,proc.send_signal(signal.SIGINT)works perfectly. On Windows, that throws an error (“signal 2 is not supported” or something like that). I am using Python 2.7 for Windows, so I have the impression that I should be able to do insteadproc.send_signal(signal.CTRL_C_EVENT)but this doesn’t do anything at all. What do I have to do? This is the code that creates the subpr

  • user1948847
    python types ctypes
    Forgive me for the poor title, I really can’t come up with a proper title.Here is my problem. Say I was given a list of strings:[‘2010.01.01’, ‘1b’, ‘`abc’ ’12:20:33.000′]And I want to do a ‘type check’ so that given the first string it returns type date, second one boolean, third one a symbol, forth one a time… etc. The returned value can be a string or anything since all I want to do is to cast the correct ctypes.Is there any way to do it?ps: my python is 2.5

  • svvitale
    python rally
    I’d like to be able to query Rally for an existing defect and then copy that defect changing only a couple of fields while maintaining all attachments. Is there a simple way to do this? I tried calling rally.create and passing the existing defect object, but it failed to serialize all members into JSON. Ultimately, it would be nice if pyral was extended to include this kind of functionality.Instead, I’ve written some code to copy each python-native attribute of the existing defect and then us

  • fdmillion
    python py2app
    I’m working with py2app on Python 2, and was wondering if there’s a way to detect from code whether my app is running as part of a compiled .app file, or as a standalone script.This is important because some of my code dynamically loads a .dylib file. When running natively as a script, this code runs fine; however, when running inside the .app, I get something like:Traceback (most recent call last):File “…/python/game/dist/main.app/Contents/Resources/__boot__.py”, line 316, in <module>_r

  • user1632979
    python windows unicode encoding utf-8
    My Python script creates a xml file under Windows XP but that file doesn’t get the right encoding with Spanish characters such ‘ñ’ or some accented letters.First of all, the filename is read from an excel shell with the following code, I use to read the Excel file xlrd libraries:filename = excelsheet.cell_value(rowx=first_row, colx=5)Then, I’ve tried some encodings without success to generate the file with the right encode:filename = filename[:-1].encode(“utf-8”) filename = filename[:-1].encode(

  • Jorge
    java python jpype py4j
    This code below runs properly under windows 7 64 bits but it fails under OSX or Windows 8 32bits with Memory access errors or Segmentation Faults. All system run last java version 7.0_51HashSet = jpype.JClass(‘java.util.HashSet’) instruments = HashSet(); instruments.add(jpype.JPackage(‘com’).dukascopy.api.Instrument.EURUSD) client.setSubscribedInstruments(instruments);class MyStrategy:def onTick(self, instrument, tick):print “Tick received”print tick.getAsk()def onAccount(self, account):print “o

  • Big Al
    django nginx
    First of all, please excuse my low-level English. I’m not native English speaker.. but I’ll try to explain well as far as possible.I really have no idea about this situation. I thought that it’s iptables problem.. but it seems not.I’m getting a server hosting(CentOS). I installed Nginx + Django and nginx uses 8080 port. A domain is connected to the server.When I executed “wget [domain]:8080/[app name]/” in the server, it works. Of course, “wget 127.0.0.1:8080/[app name]/” has no problem. (wget [

  • michas
    django internet-explorer firefox https applet
    We have developed an analytics application that use a special Java applet (developed by IBM) to view some data. It’s a Django application that runs on Apache. Everything worked fine until we moved to SSL. The behavior is very strange and we are confused and a little bit worried how to make the applet work on HTTPS. Ok, I have read many threads about security updates that were introduced in JRE 7u51 (Java JRE plugins) but I think that this is not the reason of our problems. My current environment

  • user61629
    python ruby django chef vagrant
    I am working my way through a video tutorial at http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/I am working on win7 and using git-bash for my terminal. I have installed the latest virtualbox – 4.2.12 and the latest vagrant – 1.22. I tried to run vagrant up and got:$ vagrant upBringing machine ‘default’ up with ‘virtualbox’ provider…[default] Setting the name of the VM…[default] Clearing any previously set forwarded ports…[default] Creating shared folders metadata…

  • the_drow
    django neo4j neo4j.py
    I am using the django integration for neo4j and I’m getting the following traceback when I’m trying to create a node. I do have JPype installed and it can be imported.p = Person.objects.create(first_name=’omer’, last_name=’katz’) Traceback (most recent call last):File “<console>”, line 1, in <module>File “/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py”, line 138, in createreturn self.get_query_set().create(**kwargs)File “/usr/local/lib/python2.7/dist-packages/Neo4

  • kdhuang
    android django sqlite http-post jpeg
    This is my first android app and I am trying to POST images taken on the camera (ICS 4.0) to a Django server. I have been getting a NULL pointer exception error but I have no clue where this is occurring. Also, When I don’t the app crashes when trying to upload. I’m not sure what is going on. I am using Fragments.Here is my Django post code:def post(self, request, *args, **kwargs):image = get_object_or_404(Img, **kwargs)inst = Instance(stream=image.stream)uploaded_file = \File(‘-.jpg’, self.FILE

  • alecxe
    django selenium travis-ci lettuce splinter
    I have about 130 lettuce tests which runs fine locally, but when travis runs them it hangs after a few tests.Here the tests fails at the 8th scenario: https://travis-ci.org/h3/django-editlive/jobs/3945466And when I remove the last scenario it passes: https://travis-ci.org/h3/django-editlive/builds/3945648I tried splitting my tests in separate features files, same problem.It’s doesn’t seem to be caused by a specific scenario, but rather by the number of scenario ran.According to Travis’ docs:Wait

  • michaeljtbrooks
    django django-database django-managers rawsql
    I’ve written a function for Django which allows a user to enter a word or phrase, and fetch all the instances in a specified model where that instance has all those words appear in any order across a range of specified fields. I have chosen to use the objects.raw method and write custom SQL for this as there’s problems using the Django Q object to build the correct query. def fuzzy_search(objmodel,columns,q=”,limit=None,offset=0):”””TEMPORARY PATCH version for fuzzy_search, gets around a native

  • RBarryYoung
    sql-server django unicode odbc freetds
    I’m trying to store Django data on MS SQL Server 2005 using:http://code.google.com/p/django-pyodbc/ (pyodbc + FreeTDS)As long as I’m storing string consist of ASCII characters everything is ok. When I’m using unicode (ex. ‘\xc5\x82’), django throws ProgrammingError on:ProgrammingError at /admin/cli/punktrejestracji/add/ (‘42000’, ‘[42000] [FreeTDS][SQL Server]The incoming tabular data stream (TDS) protocol stream is incorrect. The stream ended unexpectedly. (4002) (SQLExecDirectW)’)last element

  • Ali Ismayilov
    django django-templates django-template-tags
    {% with start=0 end=entries.number|add:”2″ %}{{ paginator.page_range|slice:”start:end” }}{{ start }}, {{ end }}{{ paginator.page_range|slice:”0:3″ }} {% endwith %}Why Django 1.5 template engine produces the following output for the above code:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] 0, 3 [1, 2, 3]

  • Charles Merriam
    python mysql django virtualenv virtualenvwrapper
    This is a much discussed issue for OSX 10.6 users, but I haven’t been able to find a solution that works. Here’s my setup:Python 2.6.1 64bit Django 1.2.1 MySQL 5.1.47 osx10.6 64bitI create a virtualenvwrapper with –no-site-packages, then installed Django. When I activate the virtualenv and run python manage.py syncdb, I get this error:Traceback (most recent call last): File “manage.py”, line 11, in <module>execute_manager(settings) File “/Users/joerobinson/.virtualenvs/dj_tut/lib/python2.

  • Heitziii
    logging ejb
    I’am the new guy and hope I can find solutions for my problems and I hope also that I can help other peoples to find solution for their problems.Now to my first problem ^^ I’am working with JBoss at the moment and try to log the exceptions without stacktraces. This works all fine but there is one exception I can’t handle.The Problem: The user tried to login into the application with a wrong password. So I get this Exception in my logging 2013-08-29 12:33:05,197 ERROR [org.jboss.security.authenti

  • Nusrat
    logging jboss
    I am trying to update my code from Jboss 5.1 to Jboss 7 , i figured out that jboss-as-7.1 has its own logging framework . I want to know major differences and advantages of using jboss’s own logging framework over log4j . I also need an example of how I can use appender in this framework .

  • Chillie
    java android printing logging system.out
    I’m trying to run this API java in Android. Because there is no terminal in Android, System.out.println and e.printStackTrace not compile and I’ve tried to replace it in the CartoDBClient and SecuredCartoDBClient classes where I found them. However, even doing that the application close unexpectedly with these errors in the LogCatHere the codeSecuredCartoDBClient:@Overridepublic String executeQuery(String sqlQuery){String json = null;if(oAuthService == null){//System.out.println(“Error : uniniti

  • user1700945
    java logging liferay axis
    I am trying to implement a salesforce API that uses axis as one of its libraries. When I deploy the required axis.jar file to the lib/ext dir, I get the following warning on startup, and when the API gets used, it also fails with a “Could not initialize class org.apache.axis.components.logger.LogFactory” runtime error to the screen.Rex 06 Aug 2013 19:55:44,091 WARN [EngineConfigurationFactoryFinder:184] Factory org.apache.axis.configuration.EngineConfigurationFactoryServlet Ignored: missing re

  • nazar_art
    java logging log4j
    I tried to configure log4j with `log4j.properties’ file.All work but but I caught some strange warning:log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.I couldn’t figure out what is wrong with this. All should work.Content of log4j.properties:# Root logger option log4j.rootLogger=warn, stdout, file

  • gcstang
    java exception jetty logging nullpointerexception
    I’ve included all jars the application requires, I’m trying to use Jetty EmbeddedI have a simple java class with a main method that has the following setup, servlets still work correctly just can’t get JSP’s to work. All required jars are included, started with basic Jetty jars then added all from the jsp folder.Server server = new Server(8080);WebAppContext context = new WebAppContext(); context.setDescriptor(“WebRoot/WEB-INF/web.xml”); context.setResourceBase(“WebRoot/”); context.setContextPa

  • maex
    spring tomcat model-view-controller logging classnotfoundexception
    I had a working spring project and updated the framework to version 3.2.2. Now I can build my project but I can’t deploy it any more. Aparently Tomcat can’t find a class responsible for the logging. But the springframework is in my CLASSPATH, and I’m sure it is contained in the WAR, too. Did I misunderstand the tomcat log?I even started a new minimalistic spring project – same result.I’m quite stuck here – any help is appreciated.Here’s my Netbeans log:Tomcat server started. Incrementally deploy

  • Kawu
    java logging glassfish glassfish-3 slf4j
    The question originated from here: http://www.java.net/forum/topic/glassfish/glassfish/configuring-glassfish-logging-format – without an answer.The default GlassFish 3 logging format is very annoying, much too long.[#|2012-03-02T09:22:03.165+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=113;_ThreadName=AWT-EventQueue-0;| MESSAGE… ]This is just a horrible default IMO. The docs just explain all the fields, but not how to change the format: htt

  • webyildirim
    java logging weblogic
    Jdeveloper 11.1.1.6 is installed on my computer. IntegratedWeblogicServer 10.3 works without problem. I just installed Jdeveloper 11.1.2.3 version and did not import ex ide version preferences into new installation while firstly opening. I started integrated weblogic server from new version of jdeveloper then created new domain and server switched in running mode without any errors. But when i try to open webconsole throughout localhost:7101/console. (additionaly ex server still works normal, i

  • Kelly Beard
    java logging log4j
    I have a program that runs for individual customers. Each customer has an account code (we call it a start code). The account code is communicated to the program via a commandline parameter. I’m getting the following exception thrown back at me, which by the way, doesn’t cause a program crash, it goes happily on its way. I want to separate the logging by customer account, which seems to be working. My log file will get created to “Balancer_990004.log” and log messages certainly build up to

  • Rubens Mariuzzo
    laravel twig sentry cartalyst-sentry
    I’m trying to check if Sentry user is logged in on twig template on a Laravel project, i’m using twigbridge.How do i?{% if Sentry::Check() == false %}This gives me:Unexpected token “punctuation” of value “:” (“end of statement block” expected) in “layouts.menu” at line 61Same for:{{ Sentry::getUser()->first_name }}

  • Timmy O’Mahony
    python django logging sentry raven
    Now that django-sentry has become a standalone server (and is fantastic) I’m trying to port my apps over to use it. I have set up a standalone server configured a django application to log using django 1.3’s logging dictionary conf as per the raven docs. I can’t seem to get any celery tasks to log to the sentry server (they do get printed out to the console though). I’m not really sure what I should be doing? I have included raven.contrib.django.celery in my `INSTALLED_APPS’. Uncaught exceptions

  • sany
    android sentry
    I need to implement Sentry for my android app, I try to find an example about how I have to implement this, but I can’t find it. I saw the Sentry documentation in http://sentry.readthedocs.org/en/latest/developer/client/index.html#server_nameBut I have some questions. If my app crash, the exception will be captured? Should I put this code line into my try/catch? var $resultId = myClient->captureException($myException); (in android code)If somebody has a sample in android I will be grateful.Tha

  • user2267668
    php laravel-4 sentry
    I am trying to follow a tutorial about the basics of Databases and i am at the part of setting up Sentry 2. I added all the exceptions as requested. But on step four of the documentation page on the Sentry 2 website. I am getting the following error{“error”:{“type”:”ErrorException”,”message”:”Undefined index: collation”,”file”:”\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php”,”line”:22}}I tried a few things as noted in my ssh screen but

  • Timmy O’Mahony
    python django logging sentry raven
    Now that django-sentry has become a standalone server (and is fantastic) I’m trying to port my apps over to use it. I have set up a standalone server configured a django application to log using django 1.3’s logging dictionary conf as per the raven docs. I can’t seem to get any celery tasks to log to the sentry server (they do get printed out to the console though). I’m not really sure what I should be doing? I have included raven.contrib.django.celery in my `INSTALLED_APPS’. Uncaught exceptions

Web site is in building