Plone 4.3 and transmogrifier installation - migration

I am trying to migrate content from old 3.x Plone installation to new Plone 4.3 instance. Both are running on windows platforms.
In new 4.3 installation I am trying to install quintagroup.transmogrifier and instance does not start.
bin\instance.exe fg gives following:
clip
Presumably normal entries removed...
clip
File "c:\plone43\eggs\zope.configuration-3.7.4-py2.7.egg\zope\configuration\config.py", line 179, in resolve
mod = __import__(mname, *_import_chickens)
File "c:\plone43\eggs\quintagroup.transmogrifier-0.4-py2.7.egg\quintagroup\transmogrifier\writer.py", line 13, in <module>
import quintagroup.transmogrifier.patches
File "c:\plone43\eggs\quintagroup.transmogrifier-0.4-py2.7.egg\quintagroup\transmogrifier\patches.py", line 89, in <module>
from tarfile import nts, GNUTYPE_SPARSE, normpath
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "c:\Plone43\parts\instance\etc\site.zcml", line 15.2-15.55
ZopeXMLConfigurationError: File "c:\Plone43\parts\instance\etc\package-includes\002-quintagroup.transmogrifier-configure.zcml", line 1.0-1.70
ZopeXMLConfigurationError: File "c:\plone43\eggs\quintagroup.transmogrifier-0.4-py2.7.egg\quintagroup\transmogrifier\configure.zcml", line 67.4-70.10
ImportError: cannot import name normpath
Is this something that transmogrifier is not allowd to load python module (v.2.7) in Plone or cannot find it from windows?
How could I fix the issue or approach it further?
I tried, just to copy data.fs to new site, but it seems to import a lot of "crap" from old version as well and some of the functionality dows not work properly.
I am not thet familiar with Plone/Zope/Python, but so far I have managed to get the job done.
Thanks

It's a bug in quintagroup.transmogrifier that has been fixed but not yet released.
For now, you can use the version on Github. If you are using mr.developer, the easiest way is to amend your buildout.cfg as follows:
[sources]
quintagroup.transmogrifier = git git://github.com/collective/quintagroup.transmogrifier.git

Related

scrapyd deployed in KubeSphere,and when running scrapy selenium got exception:'twisted.internet.error.ReactorAlreadyInstalledError'

I deploy scrapyd in KubeSphere, I got expectation when I run scrapy and selenium:
2022-03-16T12:57:15+0000 [Launcher,1832/stderr] return Crawler(spidercls, self.settings, init_reactor=True)
File "/usr/local/lib/python3.9/site-packages/scrapy/crawler.py", line 82, in __init__
default.install()
File "/usr/local/lib/python3.9/site-packages/twisted/internet/epollreactor.py", line 256, in install
2022-03-16T12:57:15+0000 [Launcher,1832/stderr] installReactor(p)
File "/usr/local/lib/python3.9/site-packages/twisted/internet/main.py", line 32, in installReactor
2022-03-16T12:57:15+0000 [Launcher,1832/stderr] raise error.ReactorAlreadyInstalledError("reactor already installed")
twisted.internet.error.ReactorAlreadyInstalledError: reactor already installed
I don't have twisted installed separately. Why does it report that it already exists?
Without code and package version, it is hard to guess what happens. If your program was once working, check your scrapy version. There is an issue in latest 2.6 version. You could pin your scrapy at 2.5.1 .
If you are under developing scrapy scripts, you might want to run multiple spiders in a script. It is easy to mess up the pipeline and get twisted.internet.error.ReactorAlreadyInstalledError error. You could check this.

Import does not function as bat file; but works in spyder

I am still not the most sophisticated python user; but I cannot overcome this probably simple problem. I have a code that works perfectly with the spyder interface. I would like to make it a recurring task via creating a bat file. The bat file which in turn triggers a cmd interface does not import pandas_data reader and the code gets stuck and aborts.
import pandas_datareader.data as web
this line above creates the error below. It's a lengthy text.
File "C:\Users\myself\anaconda3\lib\site-packages\pandas_datareader\__init__.py", line 2, in <module>
from .data import ( File "C:\Users\myself\anaconda3\lib\site-packages\pandas_datareader\data.py", line 9, in <module>
from pandas.util._decorators import deprecate_kwarg File "C:\Users\myself\anaconda3\lib\site-packages\pandas\__init__.py", line 17, in <module>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies) ImportError: Unable to import required dependencies: numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "C:\Users\myself\anaconda3\python.exe",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.17.0" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: DLL load failed: The specified module could not be found.

"ImportError: DLL load failed" when importing tensorflow

I get an error when trying to import Tensorflow (v.2.2):
In order to make sure that there are no issues with the Tensorflow installation, I re-installed all the relevant packages in a virtual environment. The error stack that results is the following (both in the virtual and in the original environments)
ImportError: Traceback (most recent call last):
File "C:\Anaconda\envs\cifar_env\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Anaconda\envs\cifar_env\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Anaconda\envs\cifar_env\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "c:\anaconda\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "c:\anaconda\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
Is it possible to tell What DLL is failing to load exactly?
Edit:
If I downgrade to Tensorflow v2.0 the import doesn't fail, but all scripts need to be re-written
If I downgrade to Tensorflow v2.1, the import still fails.
It would be really helpful if somebody could point at what the issue might be.
Downgrading to Tensorflow v1.13.1, which I am using in another machine, results in a collection of warnings, but no errors.
Ridiculous altogether
I had this issue and there didn't appear to be any smoking gun solution - none of them worked in isolation. For anyone truly desperate, this is what I did that cumulatively solved the issue. Note, I am working in an Anaconda Virtual Environment (venv):
I ensured the C++ redistributable was correctly installed, as suggested by xdhmoore in the this related post. After uninstalling and reinstalling it, to be certain, I upgraded Visual Studio from 2019 to 2022.
I updated Conda to the newest version.
Thereafter, I created a wholly new venv. However, I did not use Conda to install any packages except the mandatory packages that it uses to create the environment. I then installed tensorflow using pip (and all other desired packages that I was having issues with pip as well).
Due to this GitHub post, I copied msvcp140.dll from the System32 folder to my venv's DLL folder.
Thereafter, tensorflow works again.

Anaconda install of Tensorflow missing 'audio_ops' from contrib framework

I'm trying to follow along the Audio Recognition Network tutorial.
I've created an Anaconda environment with python 3.6 and followed the install instruction accordingly for installing the GPU whl.
I can run the 'hello world' TF example.
When I go to run 'train.py' in the Audio Recognition Network tutorial/example, I get:
Traceback (most recent call last):
File "train.py", line 79, in <module>
import input_data
File "/home/philglau/speech_commands/input_data.py", line 35, in <module>
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
ImportError: cannot import name 'audio_ops'
The code in the tutorial that fails is:
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
I then backed up that chain until I could import some part of it:
import tensorflow.contrib.framework as test ==> works
import tensorflow.contrib.framework.python as test --> fail:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow.contrib.framework' has no attribute 'python'
Not sure where I'm going wrong on my install.
Details:
Ubuntu 16.04
Anaconda env with python 3.6
Followed the 'anaconda' instruction on the TF install page. (GPU version)
I also tried using a python 2.7 env for anaconda but got the same results.
It looks like they're releasing the audio_ops modules in version 1.4 (https://github.com/tensorflow/tensorflow/issues/11339#issuecomment-327879009).
Until v1.4 is released, an easy way around this is to install the nightly tensorflow build
pip install tf-nightly
or with the docker image linked in the issue comment.
The short answer:
The framework is missing the "audio_ops.py" and the example wont work until the file is released. Or you code the wrappers.
More on this:
If you go to the: tensorflow.contrib.framework.python.ops local folder you can find other *_ops.py files but not the "audio_ops.py".
If you get it from the Master at: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/framework/python/ops
You will find the file is almost empty and with import labels wrong: "audio_ops" vs "gen_audio_ops".
With almost empty I mean that: decode_wav, encode_wav, audio_spectrogram , mfcc are not implemented/wrapped.
So, no working example and no fun.
We need to check again when "audio_ops.py" is released.
Here:
https://github.com/tensorflow/tensorflow/issues/11339
You can find a Developer saying: "we don't actually want to make them public / supported yet. I'm sorry this decision wasn't better documented"

Error with PyQtDeploy

I'm using PyQt 5.3.1 and I'm deploying with pyqtdeploy 0.4 and when i want to build a project i obtain this error message:
Generating code...
Cleaning E:\ProgramasPython3\PythonQT\QTCalculator\build.
Freezing C:\Users\Tobal\AppData\Local\Temp\bootstrap_py3.py
Freezing E:\ProgramasPython3\PythonQT\QTCalculator\qtcalculator.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\__init__.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\calculator_ui.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\img_rc.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\qtcalculator.py
Freezing C:\Python34\libs\site-packages\PyQt5\__init__.py
Unable to freeze C:\Python34\libs\site-packages\PyQt5\__init__.py.
Traceback (most recent call last):
File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 103, in <module>
freeze_as_data(py_file, options.as_data)
File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 36, in freeze_as_data
code = _get_marshalled_code(py_filename)
File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 71, in _get_marshalled_code
source_file = open(py_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python34\\libs\\site-packages\\PyQt5\\__init__.py'
I think this is a bug. someone does know how to fix it?
Thanks
Did you build PyQt5 statically? The host and target Python are two different things, and often in different directories. The target Python has PyQt module built statically, the host Python must also have PyQt5 installed (because pyqtdeploy uses Qt for its GUI) but its usually a dynamic library in the host Python.
In the pyqtdeploy GUI on "Locations" tab, make sure that "Standard library directory" is correct.