Error while running Plone 4.2 instance fg on Window - python

While running buildout on window with Python 2.6 for Plone 4.2, All went fine. but while running instance on foreground it give me this window specific (presume) error about some file missing.
I remember on older version of Plone for installing PyWin type libary, I had to copy some dll file to window system file and I also done same for this. still I am having this error.
Any suggestion/advise would great help.
Thank for taking your time.
D:\rcseng\buildout>bin\instance fg
Traceback (most recent call last):
File "D:\rcseng\buildout\bin\instance-script.py", line 258, in <module>
+ sys.argv[1:])
File "d:\rcseng\buildout\eggs\plone.recipe.zope2instance-4.2.8-py2.6.egg\plone
\recipe\zope2instance\ctl.py", line 614, in main
c.onecmd(' '.join(options.args))
File "D:\Python26\lib\cmd.py", line 219, in onecmd
return func(arg)
File "d:\rcseng\buildout\eggs\zdaemon-2.0.7-py2.6.egg\zdaemon\zdctl.py", line
588, in do_fg
self.do_foreground(arg)
File "d:\rcseng\buildout\eggs\plone.recipe.zope2instance-4.2.8-py2.6.egg\plone
\recipe\zope2instance\ctl.py", line 550, in do_foreground
self._exitstatus = subprocess.call(command, env=env)
File "D:\Python26\lib\subprocess.py", line 470, in call
return Popen(*popenargs, **kwargs).wait()
File "D:\Python26\lib\subprocess.py", line 623, in __init__
errread, errwrite)
File "D:\Python26\lib\subprocess.py", line 833, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Related

Windows 10 Error: FileNotFoundError: The System cannot find the file specified subprocess while executing an .exe

I get an error every time i want to start a exe build python. I cant change the code because its an exe.
The full error:
Traceback (most recent call last):
File "boltchecker.py", line 6897, in <module>
File "boltchecker.py", line 4819, in __init__
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 489, in run
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
[18104] Failed to execute script boltchecker
I hope someone can help me with this :)

getting gmsh into the virtualenv

I'm extremely new to Python, so sorry if this is a stupid question. Anyways, I'm getting this error when trying to run a package I installed on PyCharm (Python IDE):
Traceback (most recent call last):
File "C:\Users\turtl\PycharmProjects\untitled\venv\Scripts\openbte-script.py", line 11, in <module>
load_entry_point('openbte==0.9.24', 'console_scripts', 'openbte')()
File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\__main__.py", line 47, in main
Geometry(**vars(args))
File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 83, in __init__
data = self.compute_mesh_data()
File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 91, in compute_mesh_data
self.import_mesh()
File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 448, in import_mesh
a=subprocess.check_output(['gmsh','-' + str(self.dim),'mesh.geo','-o','mesh.msh'])
File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
From what I've gathered from previous questions, it seems this is because I don't have gmsh in my virtualenv. Now that I've downloaded gmsh, I can't find a proper installation guide on how to get it into the virtualenv. Does anyone have experience with this?
I guess more specifically, is there a way I can pinpoint the path that it's trying to access and just paste gmsh into that directory?
openbte\geometry.py seems to run gmsh.exe without any path:
a=subprocess.check_output(['gmsh','-' + str(self.dim),'mesh.geo','-o','mesh.msh'])
Which means it expects gmsh.exe somewhere in the %PATH%. So install gmsh and add the directory with gmsh.exe to the %PATH%.

Pyinstaller Not Compiling Large Program in Python2.7 64-Bit Ubuntu

I have been having some difficulties compiling my Python program using Pyinstaller. My program has multiple modules and about 2000 lines of code. It uses TaurusScada as a sort of wrapper for PYQT, Numpy, and a few other modules. The platform is Python 2.7 and Ubuntu 15.04. I'm also using Pyinstaller 3.1. I was successful in compiling a small "Hello World" type application so I know it works. I am not married to Pyinstaller as I have tried cx_Freeze as well without success. Rather than leaving my entire code on here I'll start by leaving the traceback and error in hopes that someone can shed some light on this:
66874 INFO: Processing hook hook-gi.repository.GdkPixbuf.py
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 755, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 701, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 212, in __init__
self.__postinit__()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/datastruct.py", line 183, in __postinit__
self.assemble()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 432, in assemble
imphook_object = ImportHook(imported_name, hook_file)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/imphook.py", line 182, in __init__
self._module = importlib_load_source(hook_modname, self._filename)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py", line 36, in <module>
cachedata = subprocess.check_output('gdk-pixbuf-query-loaders')
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any help is much appreciated.
i had a similar error today. You are missing the gdk-pixbuf library:
so just run:
sudo apt-get install libgdk-pixbuf2.0-dev
and pyinstaller should go smoothly

"environment can only contain strings" error while creating a Django CMS project on Windows

I am getting this error when trying to build a project with
djangocms -p . mysite
I have gone through all the answers in StackOverflow but couldn't solve the problem.
Traceback (most recent call last):
File "C:\Users\PC4\Desktop\site14\env\Scripts\djangocms-script.py", line 9, in <module>
load_entry_point('djangocms-installer==0.8.1', 'console_scripts', 'djangocms')()
File "c:\users\pc4\desktop\site14\env\lib\site-packages\djangocms_installer\main.py", line 41, in execute
django.setup_database(config_data)
File "c:\users\pc4\desktop\site14\env\lib\site-packages\djangocms_installer\django\__init__.py", line 404, in setup_database
env=env
File "c:\python27\Lib\subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\python27\Lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "c:\python27\Lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "c:\python27\Lib\subprocess.py", line 958, in _execute_child
startupinfo)
TypeError: environment can only contain strings
Changing to Linux is not an option.

cannot run python MRJob locally

If i understand MRJob correctly, you can simulate hadoop's multi process run using MRJob by running it with
python mrfile.py -r local input.txt
I'm running windows(no choice for now), and when I issue the above command, i'm getting a bunch of mambo jumbo and at the end it tells me :
WindowsError: [Error 2] The system cannot find the file specified
This is the full error. Could someone help?
C:\Users\someuser\Documents\Python_projects\something>python MRJob_parser.py -r loc
al test2.txt
no configs found; falling back on auto-configuration
no configs found; falling back on auto-configuration
creating tmp directory c:\users\someuser\appdata\local\temp\MRJob_parser.someuser.
20150701.211822.496000
writing wrapper script to c:\users\someuser\appdata\local\temp\MRJob_parser.bw401
45.20150701.211822.496000\setup-wrapper.sh
writing to c:\users\someuser\appdata\local\temp\MRJob_parser.someuser.20150701.211
822.496000\step-0-mapper_part-00000
> sh -ex setup-wrapper.sh 'c:\Users\someuser\Documents\python_venv\something_Project\
Scripts\python.exe' MRJob_parser.py --step-num=0 --mapper 'c:\users\someuser\appd
ata\local\temp\MRJob_parser.someuser.20150701.211822.496000\input_part-00000' > c
:\users\someuser\appdata\local\temp\MRJob_parser.someuser.20150701.211822.496000\s
tep-0-mapper_part-00000
Traceback (most recent call last):
File "MRJob_parser.py", line 18, in <module>
Extractor.run()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\job.py", line 461, in run
mr_job.execute()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\job.py", line 479, in execute
super(MRJob, self).execute()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\launch.py", line 151, in execute
self.run_job()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\launch.py", line 214, in run_job
runner.run()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\runner.py", line 464, in run
self._run()
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\sim.py", line 173, in _run
self._invoke_step(step_num, 'mapper')
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\sim.py", line 260, in _invoke_step
working_dir, env)
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\local.py", line 147, in _run_step
procs_args, output_path, working_dir, env)
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\local.py", line 250, in _invoke_processes
cwd=working_dir, env=env)
File "c:\Users\someuser\Documents\python_venv\something_Project\lib\site-packages\m
rjob\local.py", line 73, in _chain_procs
proc = Popen(args, **proc_kwargs)
File "C:\Python27\Lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\Lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
C:\Users\someuser\Documents\Python_projects\something>
From https://github.com/Yelp/mrjob:
# locally
python mrjob/examples/mr_word_freq_count.py README.rst > counts
My guess is that you don't have to pass in the local runner option and that's causing some kind of error.

Categories