How can I get more information about a py2app error? - py2app

I am trying to package up a mixed Python/C++ application using py2app. My setup.py is
from setuptools import setup
setup(app=['voxpopuli.py'],data_files=[],options=
{'py2app'{'argv_emulation':True}},setup_requires=['py2app'])
and I invoke py2app via
python setup.py py2app --no-strip --iconfile /Users/irving/otherlab/other/bin/OLicon.icns --resources /opt/local/lib/Resources/qt_menu.nib
This completes without warnings or errors, but when I try to run the resuling app a window pops up that simply says "voxpopuli Error". It has an "Open Console" button, but the only console messages are
9/21/12 11:43:14.691 AM voxpopuli[52765]: voxpopuli Error
9/21/12 11:43:15.926 AM com.apple.launchd.peruser.501[158]: ([0x0-0x177d77c].org.pythonmac.unspecified.voxpopuli[52765]) Exited with code: 255
Are there standard ways to get more information out of py2app to help diagnosing this error?

I believe this is a problem with the app rather than the py2app.
If the app hits an unhandled exception it will exit out like this. Which version of osx are you using? In 10.8 they stopped automatically forwarding stderr to the console, so might be an idea to pipe the applications stdout and stderr to a file to see if you have a stack trace.
Although if it's an error in the C++ part I'm guessing you wouldn't see a stack trace, but the error could be in that part of the application.
If you really can't find the issue, try stripping large parts out the app until it runs then add bits back in until it doesn't run, then strip etc. (like a binary search) to try and find the offending part.

With the package built you can still run the 'application' from the command line.
For example for your project in ~/Projects/MyApp built into folder ~/Projects/MyApp/dist you should find you can run the following from commandline: ~/Projects/MyApp/dist/MyApp.app/Contents/MacOS/MyApp
This will output all the normal stderr messages to the console so you can see what is going wrong.

Related

AWS Appium Project Package

I see below error while packaging appium project for AWS.
Unknown lifecycle phase --DskipTests=true. You must specify a valid lifecycle phase or a goal in the format
Note:
Executing packaging command on mac terminal
Tried both --DskipTests=true & -DskipTests=true (see same error for both)
Looking forward for some help. Thanks!
I work for the AWS Device Farm team.
I have seen this error when users copy-paste the command from the documentation.
We are working on updating this as there seems to be some unknown characters that get introduced.
Users have got this to work by deleting -DskipTests=true and typing it instead of copy pasting it.
Since you are on a Mac terminal you will need to use a single dash '-' for the parameter.
Apologies for the inconvenience.
Hope this helps.

What is/how do I get the Device Tree Compiler?

I am trying to program a Xilinx zc706 board, which involves building a Linux kernel and setting up the bootloader. I am following the workflow given here.
The first step after downloading stuff involves making the device tree compiler, which I need to get UBoot, which I need to start up linux. I obtained the source for DTC off github, but when I went into the SDK shell, moved to the directory, and entered "MAKE", I got an error:
sed: -e expression #1, char 1: unknown command: `''
-x was unexpected at this time.
" " LEX convert-dtsv0-lexer.lex.c
process_begin: CreateProcess(NULL,flex -oconvert-dtsv0-lexer.lex.c convert-dtsv0-lexer.1, ...) failed.
and then followed with some other stuff saying files could not be found, presumably because this first thing failed.
I have no idea how to read this error, it's gibberish to me. Can someone explain either what's wrong with this build, or how I can get either the DTC or UBoot I would need to run a Zynq chip?
It looks like you're making things much harder on yourself by doing manually what PetaLinux will do automatically for you. Unless you're a die-hard Linux purist and want to build your embedded Linux system from scratch, you should stop reading after the first paragraph of the link you posted and head to the PetaLinux wiki page.
Follow the steps in the PetaLinux Tools Reference Guide to get your project up and running. It will handle building u-boot, rootfs, linux kernel, and device tree compiler for you (petalinux-* commands) and you can focus on developing your application.

javafx native package error invoking method

I'm developing a desktop application using javafx v8.0.60. I have created an exe package with ant in netbeans 8. When I run exe file in my computer, it is installed and run without any problem.
On the other hand, when I try to install and run it on some other computer, at the end of installation, window dialog pops up:
"Error invoking method"
I click Ok. Another window pop up saying:
"Failed to launch jvm"
Davood, greetings! I had this same problem and I, like you, found no help anywhere.
I submit to you a solution, which miraculously worked for me and helped me make sense of those blasted "Error invoking method." and "Failed to launch JVM" dialogs:
Find your .jar file
It has the same name as your Project and it's in your application's installation directory under AppData\Local\{ApplicationTitle}\app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
Navigate to it's directory in command prompt
shift+Right Click any blank spot in the Explorer window and choose "Open command window here" (that's a fancy trick I recently learned; alternatively you would cd to the same directory using the command prompt)
Run your .jar via the command line
type java -jar "HelloWorld.jar" and hit Enter
Tadah! Behold your hidden exceptions (the existence of which "Error invoking method." so vaguely tries to communicate to you). *
If your problem is similar to mine it stems from a file structure difference between the project out folder and the installation directory, and that's why the program compiles just fine in the editor and builds just fine—there isn't a problem until it's built out, and the file structure is a little different.
*If you didn't get anything when you ran it via the command line, look for any errors that could be happening during that initialize() method; that's where your problem likely is. You can expose any exceptions during runtime by using a Popup Exception Dialog like shown in a similar problem, here.

TFS build partially succeeded when calling a batch file, but no error in log

I’m building a solution which requires a batch file to be run after the build (there's a sequence in the workflow for this). TFS flags the build as partially succeeded, but there’s no error in the log even in full verbose mode ("diagnostic"). I’m checking the errorlevel after each line in the batch file and it’s always 0. I’ve also tested redirecting stdout and stderr in a file after each line and there’s no clue there.
It’s got nothing to do with unit tests because I’m skipping them for the time being.
I’ve noticed that usually when an error occurs in a batch file (e.g. file not found) there’s a visual cue to indicate the error and this matches the partially succeeded status. But I don’t see any visual cue.
So how can TFS decide that the build is only partially succeeded?
Thank you,
Solved.
It turns out the GetImpactedTests activity is throwing an exception (I can see it in the event viewer of the TFS machine), but it doesn't show at all in the build log.
I'm guessing that this exception makes the build partially succeeded (because the compilation part succeeded) but I couldn't see the assignment explicitly in the buid log. When I bypass the impact analysis (either by setting Analyze Test Impact to False or by removing the GetImpactedTests activity altogether), the error does not occur.
We experiment something similar here using the Lab Workflow (to kick our CodedUI tests). Different build template, same symptoms.
I have noticed that the build process reports that it partially succeeded, highlighting what seems to be a successful step in the deploy script (batch file).
The command is question is a command to install our mobile app on a mobile device (in order to test it at night):
adb install -d -r test.apk
I thought about looking the errorlevel right after running the adb command but the errorlevel was 0.
Then I thought that maybe the command is sending its output to stderr and found out this article on the android open source project, which confirms my hypothesis.
Following is my fix:
adb install -r -d test.apk 2>&1
Appending 2>&1 simply redirects stderr to stdout and now my deploy script does not report an error anymore and the build now succeeds (when all tests pass!).
Conclusion: When a script writes anything to stderr, the build workflow will report it as an error (partial success since it does not prevent execution of the workflow).
I know this is not your particular issue but since we had the same symptoms, I thought the stderr information could help somebody else find out the reason why their build process is reporting a partial success even though everything seems to work.

Call to i:im() in application debugger failed in ejabberd

I'm trying to debug ejabberd. I have compiled the files with debug_info. I start ejabberd, then use ejabberd debug to get into the shell. Once in there, running im() produces "Call to i:im() in application debugger failed". I can't figure out what's causing this. Any ideas on how to debug?
Edit
I've tried running this in just the erl shell independent of ejabberd and it still fails. So it looks like it's related to my erlang setup as opposed to a problem with my ejabberd setup.
Foolish me: apt-get install erlang-debugger solved the problem.

Resources