AttributeError: module 'mod_wsgi' has no attribute 'subscribe_events' - apache2

I am using django 2.0, python 3.5, apache2, mod_wsgi. But my site is performing very slow. For finding the cause of the issue, I have embedded script as suggested by Graham Dumpleton in this link https://github.com/GrahamDumpleton/mod_wsgi/issues/228#issuecomment-331365102
But I am facing following error:
AttributeError: module 'mod_wsgi' has no attribute 'subscribe_events'. Any help would be much appreciated

Related

Iam trying to automate the code using selenium python in pytest framework facing the Attribute error issue

def setUserName(self, username):
self.driver.find_element(By.ID, self.textbox_Username_ID).send_keys(username)
E AttributeError: 'NoneType' object has no attribute 'find_element'
AttributeError
You did not initialize driver object properly, currently it is not existing, 'NoneType' in Python

Failed to import extension kiln.py

Upgraded to Mercurial 4.7 and now I get "*** failed to import extension kiln from <....>: 'module' object has no attribute 'command'"
I have to enter id/password manually. What is wrong?
You're using Kiln Extensions and there are some changes in Mercurial 4.7 that break this.
In regards to the error you referenced, the Mercurial release notes indicate (Section 7, API Changes):
cmdutil: drop deprecated precursor of registrar.command
So you can resolve this specific issue by replacing cmdutil.command with registrar.command but that'll just expose other problems.
Personally, I didn't have any more time to mess around with this so I just downgraded to Mercurial 4.6.1.

How to properly implement PHPWord to CakePHP?

I am trying to generate a word document using phpword through cakephp but I always get a fatal error:
Error: Class 'PhpOffice\PhpWord\TemplateProcessor' not found
File:C:\xampp\htdocs\thesis\app\Controller\MainController.php
Line: 1016
line 1016:
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx');
I placed the phpword files in this path:
C:\xampp\htdocs\thesis\app\Vendor
And the docx file here:
C:\xampp\htdocs\thesis\app\Vendor\PhpWord\resources
Is there anything wrong on how I implemented phpword with cakephp?
Thank you.
I think you should install PHPWord through Composer as CakePHP is using Composer to manage its dependancies.

PageableManagerInterface error in SonataAdminBundle

I'm trying to configure SonataAdminBundle and SonataUserBundle to use mongodb and am getting the following error:
ClassNotFoundException: Attempted to load interface "PageableManagerInterface" from namespace "Sonata\CoreBundle\Model" in /Users/me/Sites/mynamespace-webtools/vendor/sonata-project/user-bundle/Model/UserManagerInterface.php line 25. Do you need to "use" it from another namespace?
Can anyone shed any light on what might be causing this? I was also getting the symptoms described here and have tried the answers suggested there.
Can anyone confirm if the mongodb functionality is just broken? Am also wondering if this error relates to this commit?
This appears to be a dependency error within the Sonata system itself, and not strictly related to the MongoDB module.
The PageableManagerInterface class is provided by the Sonata Core Bundle. Make sure that you have it in your composer.json file:
"require": {
"sonata-project/core-bundle": "dev-master",
}
After that, make sure your install is up to date and clean your cache, as usual:
php composer.phar self-update ; php composer.phar update

Extracting .docx files with Tika in Apache Solr gives NoSuchMethod error

I have a Solr 4.0 module in my project (basically, a maven web project with all the solr dependencies). It worked pretty well, including content extraction and everything.
But, when I tested it with a .docx document, It gives me the following error:
13:50:34,468 ERROR [org.apache.solr.servlet.SolrDispatchFilter] (http--0.0.0.0-8080-9)
null:java.lang.RuntimeException: java.lang.NoSuchMethodError:
org.apache.poi.openxml4j.opc.PackagePart.getRelatedPart(Lorg/apache/poi/openxml4j/opc/PackageRelationship;)
Lorg/apache/poi/openxml4j/opc/PackagePart;
I tried to manually add the openxml4j dependency to the project. I've downloaded the sources and looked at it, the PackagePart#getRelatedPart really doesn't exist.
What is this error? How can I fix this?
Thanks in advance.
EDIT
I noticed that poi-ooxml already had those classes inside it. Cool, but I also inspected those sources, and still doesn't have the needed method in the PackagePart class.
BTW: I tried to add openxml4j version 1.0-beta.
It was a jarhell related issue.
Thanks, "jarhell related" was the clue I needed!
My project had POI jars prior to import of the Tika app jar, which includes its own POI jars. I deleted the standalone POI jars, and then Tika was able to handle DOCX Word 2013 file without error.
Now hopefully I won't run into a situation where I need both! :|

Resources