one file fails to execute pyinstaller - executable

I have been using pyisnataller to create executable applications of my python 3.6.5 scripts. The scripts are GUI interfaces. I have used a recipe from a previous stackoverflow post: link
It has been effective but am running into a slight snafu trying one file a simple GUI.
Why does the executable fail to run? The temporary folder created has the two files added within about.spec?
Any help would be appreciated!
I would have placed the code, and the spec file here but stackoverflow didnt seem to perform the formatting well enough to send the message. I tried backticks four spaces, a missing line followed by eight space, and

Yes, this is an ill posed question. So, turns out the pyinstaller creates a warn_yourscript_.txt file and the post warnings in the creation of the executable. The file is located in the working directory/build/yourscript/warn_yourscript_.txt. Having looked into the file, there was a warning about not being able to load or missing the TKinter module. The myscript.py was running smoothly under python 3.6.5, but I may have started my script from a starter on the internet and may have been from an earlier python. I have several pythons loaded on my machine, python could find it but pyinstaller could not? I changed out myscript to reflect earlier success with tkinter instead.

Related

How to make erlang application?

i'm trying to build the example to run an erlang websocket server.
I created all that files and put them into one folder, add the rebar file and ran
./rebar get-deps
inside the folder direction.
But there is no
make
make runconsole
and nothing's happening.
Is there also a possibility to create that websocket server using IntelliJ? I tried to put that 3 .erl files into IntelliJ and want to Build the project but I receive
erlc: 2: Warning: behaviour cowboy_http_handler undefined
The make command reads something called a Makefile, which is a file written in a certain format, which tells the make command what it is supposed to do, e.g. compile some files with the listed names using the listed commands. Because there is no Makefile listed in that tutorial, you should have gotten an error something like this:
No targets specified and no makefile found.
You can contact the author of the tutorial at his github account and ask him where the Makefile is. Actually, the Makefile for the tutorial is here:
https://github.com/marcelog/erws
I created all that files and put them into one folder
The instructions in the Makefile depend on the exact directory structure that the author has here:
https://github.com/marcelog/erws
I tried using rebar3 and changing some stuff in the Makefile, but I still got errors. The problem is that rel directory: I don't know how to create all the stuff in there. You need to use rebar and reltool for that:
https://gist.github.com/FabioBatSilva/f1d1c4ea250302fed8c2
Here is a cowboy websockets example that I came up with last year, see if it helps:
How to Connect Cowboy (Erlang) websocket to webflow.io generated webpage
It uses the Erlang.mk build system as described in the cowboy docs here:
https://ninenines.eu/docs/en/cowboy/2.5/guide/getting_started/

PyInstaller Executable File: ModuleNotFoundError - Pandas

Background: I have a .py script which uses c.10 libraries/dependencies (e.g., pandas numpy json) and the script also relies on a .ini file, which it looks for in the same dir as it is located.I want to add this .py file to Windows Scheduler, but before I can, I must make the file executable.
Issue: I used PyInstaller to create an executable file. I also added -- onefile and -w when creating the .exe file. My issue is that when I attempt to run the main.exe (either by double-clicking or through cmd) I get the following Unhandled exception in script -
Help: I am trying to understand how this is happening, especially as my understanding of PyInstaller is that it would create an executable file, which would inc. everything the script needs to run (Note: I have double checked that the .py contains import pandas etc.
Can someone explain to me how I would troubleshoot this and/or if there are any key steps I may have obviously missed, which might be causing this?
Try using this commandline for compiling your python file, pyinstaller.exe --onefile --noconsole --hidden-import pandas {Your_FILE_NAME}.py

Processing 3 IDE is half cyrillic

Recently I started to find interest in Processing and decided to download the offical Processing 3 IDE from https://processing.org/download/?processing. But half of the IDE is in cyrillic symbols.
Screenshot of the IDE
I already tried to change the configuration language etc. Also I downloaded the IDE to my workplace notebook and on the notebook the IDE was complete in normal english.
Now I dont know how to fix this problem, because there are no informations about a problem like this with the Processing 3 IDE.
A few things to try - you may have already.
I know you said you tried changing the config language, but I'm not sure if you changed the "language.txt" file in the directory "C:\Users\your_username\AppData\Roaming\Processing". Ensure it only contains one line - "en".
Fresh install of Processing (delete the folder you extracted to and the Processing folder in the directory mentioned above, and the sketchbook folder, usually in your documents).
UPDATE:
This is a solution which has worked for others experiencing this exact issue:
Download Processing 3.1.1 - https://github.com/processing/processing/releases/tag/processing-0250-3.1.1
Make sure Processing is not already running
Rename the java folder in the processing-3.2.3 directory to something else, eg. java_broken
Copy the java folder from 3.1.1 to the 3.2.3 directory
Try running the 3.2.3 version of processing.exe

Embedded Python 3 not creating .pyc files when using importlib

I'm trying to embed a Python 3 interpreter in an Objective C Cocoa app on a Mac, following instructions in this answer (which extends this article) and building Python and PyObjC by hand.
I'd like to be able to run Python code as plugins. I specifically don't want to rely on the stock Apple Python (v2.7). I have most of it working but can't seem to reliably load the plugin scripts. It looks like the embedded Python interpreter is unable to create the __pycache__/*.pyc files. This may be a symptom, or a cause. If I import the plugin file manually from the Python3 REPL (via import or the imp or importlib modules) the .pyc is generated and the plugin then loads correctly. If I don't do this manually the .pyc is not created and I receive a ValueError "Unmarshallable object".
I've tried loosening permissions on the script directory to no avail. The cache_tag looks OK, both from the REPL and from within the bouncer script:
>>> sys.implementation.cache_tag
'cpython-35'
py_compile raises a Cocoa exception if I try and compile the plugin file manually (I'm still digging into that).
I'm using the following:
OS X 10.11.5 (El Capitan)
XCode 7.2.1
Python v3.5.2
PyObjC v3.11
I had to make a couple of necessary tweaks to the process outlined in the linked SO answer:
Compiling Python 3 required Homebrew versions of OpenSSL and zlib, and appropriate LDFLAGS and CPPFLAGS:
export CPPFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix zlib)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix zlib)/lib"
I also ensure pip is installed OK when configuring Python to build:
./configure --prefix="/path/to/python/devbuild/python3.5.2" --with-ensurepip=install
There is a fork of the original article source (which uses the stock Python2) that works fine here, so I suspect I'm not too far off the mark. Any idea what I've missed? Do I need to sign, or otherwise give permission to, the embedded Python? Are there complilation/configuration options I've neglected to set?
TIA
Typical. It's always the last thing you try, isn't it? Adding the directory containing the plugin scripts to sys.path seems to do the trick, although I'm not sure why importlib needs this (I thought the point was to allow you to circumvent the normal import mechanism). Perhaps it's to do with the way the default importlib.machinery.SourceFileLoader is implemented?
Something like:
sys.path.append(os.path.abspath("/path/to/plugin/scripts"))
makes the "Unmarshallable object" problem go away. The cache directory and .pyc files are created correctly.

Jython ImportError when embedding into Java on 'xml.dom.minidom'

I have a python script which is processing XML using xml.dom.minidom.
When I executed it with Jython by command line (jython myfile.py), everything was fine.
But when I tried to do the same thing embedding it into a java application, (I mean reading it as an java string then passing this string for evaluation) I got:
import xml.dom.minidom
ImportError: No module named xml
Which is driving me crazy. I tried to use different jython version (2.2, 2.5), to clear the cache, but nothing works!
Jython's Documentation tells me that we can use this module without any particular remarks.
Some people had the same problem on the internet but never got any replies. Except this:
here but still nothing work. I think I have the correct values in my jython registry, because it's working using the command line! It's just the embedding which fails everything.
I'm using a full install of Jython.
Why so much trouble, so?
Thanks in advance.
i've never done this before, but are you trying to embed jython like they did here or here? do you know where you got the jython.jar in your java classpath from? if you know where your jython module is located on disc then you might be able to just add that path as they did at the bottom of this page. To find the location of your module, load up jython and look in sys.path for a path that ends in Lib. that location should have a directory named xml (the xml package) which contains a directory named dom (the dom package), which contains a file minidom.py (the minidom module).
The xml module (jython) isn't on the the python-path of your embedded jython.
This may help:
use a jython-jar which contains the Lib (and all the Batteries :-)
put the Libs on the classpath of your java app
to help debug:
log "sys.path" in your embedded jython