First qpython jnius example not working? - qpython

I am trying to test pyjnius in the qpython console on Android.
My first line:
from jnius import autoclass
fails in console with SystemError: NULL result without error in PyObject_Call
Any suggestions or am I missing something?
(I tested this on two devices with a fresh qpython install.)

Maybe you found a solution, but I had a similar experience with QPython and Plyer the otherday. Seems you can not (yet) use Plyer or Pyjnius in the console with QPython. Running the script as a Kivy app makes imports of Plyer or Pyjnius work. Try adding the following lines:
#-*-coding:utf8;-*-
#qpy:2
#qpy:kivy
on top of your script

Related

How to solve Django custom app unsolved reference error but code working?

I use PyCharm 2022.3.2 CE and Python 3.11.1
I get a Django application that is underline in red (unsolved reference) so I can't use code completion but the code is working. I guess this is a bug from PyCharm but I can't figure it out to get code completion.
Project structure
I try to import model from listings.models to listings.views
Any help would be much appreciated !
Thank you
Try to import Django app to get code completion

PlayingError: Error: Cannot find module when trying to run a play command

I have #discordjs/opus installed and I'm trying to access it to play music. I'm running on Replit and it worked fine when I was testing it so I'm guessing it has some issue with that.
Error: Cannot find module '/home/runner/omex/node_modules/#discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-glibc-2.24/opus.node```
I debugged through my instance where I was having the same issue and it looked like all of the following #discordjs/opus, node-opus and opusscript were failing so I looked in Packages (left side of replit screen, the icon looks like a 3D cube) for node-opus and opusscript.
node-opus wasn't in the list, so I installed opusscript 0.0.8 and it started working again instantly. YMMV, but let me know if this fixes your issue.

Maya Python: userSetup.py not executing without evalDeferred?

I'm running into an issue trying to import a custom module and execute it right after Maya loads. They don't load as basic lines from userSetup.py for some reason.
So I've tried to run everything with cmds.evalDeferred. That works, but I'm running into an issue where I'm adding to the sys.path and then executing a module from that. It doesn't seem to work!
Is there a better workaround for this all?

Sencha touch app remains on blue loading screen when viewing on Android device or emulator

I just created a basic sencha app by
sencha generate app --name AndroidDemo --path ../demo
and I viewed it in browser and everything is perfect.
I then followed the instructions here: http://www.sencha.com/blog/android-setup-for-sencha-touch/
and compiled the app with Sencha Cmd and when the emulator opens I only get a blue loading screen.
I also tried compiling/building the app with phonegap on phonegap build site and the build finishes successfully and after loading the app in my andoid device, again I only see the loading page and it stays on this page and the app does not launch.
I'm completely clueless. Need your help friends.
Thanks,
In your app code may be miner syntax error or other error so while app run in emulator check log cat or other option run or app in chrome and check console log. Because loading screen display in case of error as my expression with this.
i'm having the exact same problem..
(currently on windows, btw)
while it's not exactly a solution,
a workaround that i did (out of desperation to see the rest of my app on the emulator):
is to just install it directly to the emulator using the "adb" command.
haven't tried this on a mac, but i'm guessing it's almost the same thing?
after building the app using "sencha" cmd, open cmd/terminal to the build directory.
-assuming you did not change the output location, the apk will be created in your
project root folder under this folder:
"build\native-package-mobile\MYAPPNAME\packager.json\"
make sure the emulator is already running
run the following in command/terminal at the folder where the apk is located:
adb install -r MYAPPNAME.apk
wait for awhile and it should say successfully installed.
run the app in the emulator and hopefully it will go beyond the loading screen.
I don't know why this issue is happening though.
(only started tinkering with android dev/sencha yesterday and it seems to be doing all in it's power to prevent me from running my app. haha)
please share if you find the correct fix for this :)
This usually happens when you build your version and you did not imbed all needed components.
For example, when you use ...
Ext.Image
... in your code.
While running without ...
Sencha app build xxx
... Sencha will grab the component from the touch/src components folder.
But at the time you build the app, it cannot reference to that folder any longer and Sencha will stall.
Please open the console and look out for a warning like this:
[WARN][Anonymous] [Ext.Loader] Synchronously loading 'Ext.MessageBox';
consider adding 'Ext.MessageBox' explicitly as a require of the
corresponding class
You need to add these to the requires section of either App.js or a class where you use the item (here Ext.Messagebox).
Another way to find out what is happening is to run the build code inside the browser and look into the console (so instead of localhost/myapp/index.html you run localhost/myapp/build/{package}/{myapp}/index.html).
There is one other thing that might happen. It’s the scope of async operations.
Like this:
Ext.defer(function() {this.log(‘all good’);}, 500);
this is not the scope of your class.
You need to use:
Ext.defer(function() {this.log(‘all good’);}, 500, this);
Or you might even use ...
Ext.bind()
...to bind the scope to the function.

Qooxdoo - Theme to use is not available

I have an qx v2.0.1 app working off the local file system and it runs fine in Firefox v14, but in Chrome v18 it gives me this error:
Uncaught Error: The theme to use is not available: edd.theme.Theme
qx.Class.define.members.initializeMeta.js:108
qx.Class.define.members.mainAbstractGui.js:82
qx.Class.define.members.baseObject.js:141
qx.Class.define.members.mainApplication.js:38
qx.Class.define.statics.readyBaseInit.js:77
qx.Class.define.members.dispatchEventDirect.js:134
wrappedFunctionInterface.js:451
qx.Class.define.members.dispatchEventManager.js:873
qx.Class.define.statics.fireEventRegistration.js:310
qx.Class.define.members.__fireReadyApplication.js:188
qx.Class.define.statics.onScriptLoadedApplication.js:106
qx.$$loader.signalStartupedd.js:159
qx.$$loader.initUrisedd.js:195
I thought I've come across this before and a ./generate.py distclean fixed it, but not this time. Someone else had a similar bug that was fixed:
http://bugzilla.qooxdoo.org/show_bug.cgi?id=1463
Any ideas?
This question is too tricky, and probably involves things like looking at verbose generator output and your job configs, so it is not really suitable for a Q&A site. I suggest you open up a bug for it at the qooxdoo project.
Interestingly enough, after a computer reboot it started working in chrome again. So the chrome clear browser cache/history everything since the beginning of time must not catch everything. So now it's working again...odd.

Resources