I'm genetating a .exe with python and when i try to run it, a .log is generated with the following lines:
Traceback (most recent call last):
File "cuasimodo.py", line 1077, in
IOError: [Errno 2] No such file or directory: 'index.json'
obviously index.json is a file of my program which is in the same file as the rest, but it's having some problems finding it.
any idea?
When you open a file without specifying the full path, it is opened from the current working directory. It is better to specify the full path.
See "You want to know WHERE your .exe is".
Related
I have one Github project, I cloned it locally using pycharm IDE and installed all the packages to run the project successfully. When I try to build the solution, getting the exception as host alias is not in environment.
below is the exception detail.
`Unhandled exception in thread started by <function fn at 0x7fa22ef08e60>
Traceback (most recent call last):
File "./runner.py", line 20, in fn
subprocess.call(command.split(" "), cwd = directory)
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment
BUILD_NUMBER: 1390
FATAL ERROR: FEED_HOST_ALIAS not in environment`
OS version: Ubuntu 16.04 LTS
Python version: 2.7.10
Let's sort things out.
this is problem running the application. You don't "build" python applications
this seems to be a multithreaded application. Therefore there may be output from different threads.
in line 20 of your file ./runner.py you call subprocess.call().
that call internally calls some other things (Popen() and _execute_child()), but the final action is to raise an exception telling you No such file or directory.
since the subproces.call() call ends at that point, it is likely that the other output is from another thread. You could search your solution for the string 'FEED_HOST_ALIAS', but my guess is that this message is not directly related to the problem.
The problem is, as subprocess.call() reports, that the file you are asking to run does not exist. So set a breakpoint in runner.py at line 20 and have a look at what is passed as parameters. Then you should find out what happens. PyCharm lets you step into calls, so you might even want to check what happens inside subprocess.call() - or place a breakpoint somewhere within subprocess.py.
I am trying to setup python pyqmi. I installed it for python 2.7. Post this when I do "import pymqi" and run it, I see error as-
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\pymqi.py", line 104, in
import pymqe, CMQC, CMQCFC, CMQXC
ImportError: DLL load failed: The specified module could not be found.
I checked all the directory but did not find any python file called pymqe.py. Though I see a decrypted file of same as pymqe.pyd
Can someone please help me understanding what is going wrong here?
don't know if anybody ever ran into this error when loading an image in pygame?
Traceback (most recent call last):
File "SwingyMonkey.py", line 263, in <module>
game = SwingyMonkey()
File "SwingyMonkey.py", line 64, in __init__
self.background_img = pg.image.load('res/jungle-pixel.bmp').convert()
pygame.error: CGImageSourceCreateImageAtIndex() failed
let me know if anybody did!!! thanks!!!!!
This happens when you try to load a file in Mac OSX with a file location that doesn't exist, check that your file location is correct.
If you are running it through a program like NotePad++, the file may exist in that location but NotePad++ runs your program from a different location, so all your relative urls to your image won't work.
So use absolute paths instead of relative ones and see if it works.
I had already had sublime and when setting up new plug-ins, I found problem for the setup of SublimeClang. It requires libClang but I searched all my folders using the " locate clang" command and couln't find libclang at last (The doc on the web said it should be located in usr/lib/x86_64-linux-gnu/).
When i open the sublime, the console printed out like this:
Traceback (most recent call last):
File "/home/meng/.config/sublime-text-3/Packages/SublimeClang/internals/clang/cindex.py", line 95, in get_cindex_library
return cdll.LoadLibrary(filename)
File "./ctypes/__init__.py", line 431, in LoadLibrary
File "./ctypes/__init__.py", line 353, in __init__
OSError: libclang.so: cannot open shared object file: No such file or directory
error: It looks like libclang.so couldn't be loaded. You have to compile it yourself, or download from https://github.com/quarnster/SublimeClang/downloads.
Please note that this plugin uses features from clang 3.0 so make sure that is the version you have installed.
Once you have the file, you need to copy libclang.so into the root of this plugin. See http://github.com/quarnster/SublimeClang for more details.
I'm rookie in ubuntu OS and hope someone can give me help. Many thanks!
I seem to have a strange error when trying to build my app
Couldn't import generation code: No module named generate_dynamic
What is strange about this error is that I can seem to resolve the error if I uninstall and re-install trigger.io but if I make any changes tot he config the error comes back and I have to uninstall and re-install each time I make a change to the configs. It never used to do this.
Traceback (most recent call last):
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\async.py", line 106, in run
result = self._target(*self._args, **self._kwargs)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\trigger\api\app.py", line 290, in package
build(cookies, path, target)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\trigger\api\app.py", line 329, in build
forge_main.development_build([target, '--general.interactive', 'no'])
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\main.py", line 335, in development_build
manager.fetch_instructions()
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\templates.py", line 90, in fetch_instructions
import_generate_dynamic(do_reload=True)
File "C:\Users\Michael\AppData\Local\Trigger Toolkit\build-tools\forge\build.py", line 48, in import_generate_dynamic
raise ForgeError("Couldn't import generation code: {0}".format(e))
ForgeError: Couldn't import generation code: No module named generate_dynamic
That is the debug. Note sure what is going on.
Thanks.
So it looks like its not resolved, I tried to update a module and the whole thing blew up again. I sent the logs to support so we will see how long this will take.
* Edit *
I was able to resolve this by deleting the trigger.Io directory ( the uninstall does not do this ) then reinstalling and importing my project again. Not sure what happened but it's working now
I deleted the .tempalte folder and re-built. Looks like the content of that folder got jacked during a failed or canceled build.