runtimeexception

NameError: global name 'xrange' is not defined in Python 3

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 21:20:09
I am getting an error when running a python program: Traceback (most recent call last): File "C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver\_sandbox.py", line 110, in <module> File "C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver\_sandbox.py", line 27, in __init__ File "C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver\class\inventory.py", line 17, in __init__ builtins.NameError: global name 'xrange' is not defined The game is from here . What causes this error? You are trying to run a Python 2 codebase with Python 3. xrange() was renamed to range() in Python 3.

java.lang.RuntimeException Cannot find FacesContext

…衆ロ難τιáo~ 提交于 2019-11-26 21:03:40
I don't know how to continue, but I always get the "java.lang.RuntimeException: Cannot find FacesContext" for my new JSF 1.2 web application. I'm sure it's just some configuration I can't find. The exception occurs with the first f: or h: tag. Already with the important <f:view> at the beginning. My index.jsp <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <f:view> <html> <head> <title>MyWebsite</title>

Differences between Runtime/Checked/Unchecked/Error/Exception

别来无恙 提交于 2019-11-26 20:27:27
What are the Runtime exceptions and what are Checked/Unchecked Exceptions and difference between Error/Exception.Why these many types? Instead Java may simply follow a simple design(just try/catch all types) to handle an abnormal condition in a program? Throwable is at the top off all exceptions. Underneath Throwable you have Error and Exception. Underneath Exception you have RuntimeException. Java has two types of exceptions - checked and unchecked. Checked exceptions are enforced by the compiler (you have to declare them in the throws clause and catch them eventually). Unchecked exceptions

“RuntimeException: native typeface cannot be made” when loading font

社会主义新天地 提交于 2019-11-26 20:04:35
问题 I am attempting to use a custom font for a TextView on Android, following the guide here. Using the same font, same code, same everything, I get this in adb logcat: W/dalvikvm( 317): threadid=1: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 317): FATAL EXCEPTION: main E/AndroidRuntime( 317): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.evilx.quacklock/org.evilx.quacklock.MainActivity}: java.lang.RuntimeException: native typeface cannot

Unmarshalling errors in Android app with custom parcelable classes

前提是你 提交于 2019-11-26 19:31:18
问题 For my Android application, I get several unmarshalling errors although I think I've done everything that is needed to properly save and load objects via Parcelable s. Can you tell me what's wrong with my code? Error 1: java.lang.RuntimeException: Unable to start activity ComponentInfo Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@41279860: Unmarshalling unknown type code 6619241 at offset 1372 at android.os.Parcel.readValue(Parcel.java:1922) at android.os.Parcel

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'? [duplicate]

☆樱花仙子☆ 提交于 2019-11-26 18:52:17
问题 This question already has answers here : Java Error opening registry key (13 answers) Closed 4 years ago . When I run: C:\Users\ashahria\Downloads>java -jar schemaSpy_5.0.0.jar I get the error below. What is wrong? How can I fix it? Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.5', but '1.7' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment. 回答1: On my Windows 7 machine, it was solved by doing the

java.lang.RuntimeException: takePicture failed

落花浮王杯 提交于 2019-11-26 15:22:47
when i do continuous click on Capture button (without any break), getting Runtime Exception how can i resolve this issue ? if its not possible so how may i handle this Exception ? btnCapture = (ImageButton) findViewById(R.id.btnCapture); final MediaPlayer mp = MediaPlayer.create(CameraLauncherActivity.this, R.raw.button); btnCapture.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // line where getting RuntimeException camera.takePicture(null, null, mPicture); } }); Log: 02-12 14:48:41.580: E/AndroidRuntime(6997): FATAL EXCEPTION: main 02-12 14:48:41.580:

Can&#39;t create handler inside thread which has not called Looper.prepare()

江枫思渺然 提交于 2019-11-26 11:43:02
I have an Activity, and in that I have a class. text=new Dynamictext(...); text.setText("txt"); in my DynamicText java I have this code: public void setText(String text) { this.text=text; new asyncCreateText().execute(); //this.createText(text); } //private Handler handler = new Handler(); private class asyncCreateText extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... unused) { return null; } @Override protected void onPostExecute(Void unused) { } } I get: ERROR/AndroidRuntime(5176): Caused by: java.lang.RuntimeException: Can't create handler inside thread

Error:Execution failed for task &#39;:app:transformClassesWithDexForDebug&#39; in android studio

拜拜、爱过 提交于 2019-11-26 09:28:54
问题 I am moving my projects from eclipse to Android Studio. While running one of my app I get the following error. Not able to find any solution. I have enabled multidex as well. Error:Execution failed for task \':app:transformClassesWithDexForDebug\'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal

Android &#39;Unable to add window — token null is not for an application&#39; exception

走远了吗. 提交于 2019-11-26 09:25:35
问题 I get the following Android exception when I try to open a dialog. Can someone please help me understand what is going on and how can I fix this problem? android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application at android.view.ViewRoot.setView(ViewRoot.java:509) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.app.Dialog.show(Dialog.java:241)