I want to install SmartEdit to our project. We have no custom yacceleratorstorefront in our project but a custom ycommercewebservices.
I added all extensions (expect ysmarteditmodule) to our extension and run
ant addoninstall -Daddonnames=smarteditaddon -DaddonStorefront.ycommcerwebservices=ourcustomercommercewebservices
On ant clean all following error appears:
[yjavac] 1. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 6)
[yjavac] import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController;
[yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[yjavac] The import de.hybris.platform.acceleratorstorefrontcommons.controllers cannot be resolved
[yjavac] ----------
[yjavac] 2. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 7)
[yjavac] import de.hybris.platform.acceleratorstorefrontcommons.interceptors.BeforeViewHandler;
[yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[yjavac] The import de.hybris.platform.acceleratorstorefrontcommons.interceptors cannot be resolved
[yjavac] ----------
[yjavac] 3. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 28)
[yjavac] public class SmarteditaddonCmsPageBeforeViewHandler implements BeforeViewHandler
[yjavac] ^^^^^^^^^^^^^^^^^
[yjavac] BeforeViewHandler cannot be resolved to a type
[yjavac] ----------
[yjavac] 4. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 38)
[yjavac] public void beforeView(final HttpServletRequest request, final HttpServletResponse response, final ModelAndView modelAndView)
[yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[yjavac] The method beforeView(HttpServletRequest, HttpServletResponse, ModelAndView) of type SmarteditaddonCmsPageBeforeViewHandler must override or implement a supertype method
[yjavac] ----------
[yjavac] 5. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 43)
[yjavac] final AbstractPageModel page = (AbstractPageModel) modelAndView.getModel().get(AbstractPageController.CMS_PAGE_MODEL);
[yjavac] ^^^^^^^^^^^^^^^^^^^^^^
[yjavac] AbstractPageController cannot be resolved to a variable
[yjavac] ----------
[yjavac] 5 problems (5 errors)
BUILD FAILED
I found a similar issue in https://answers.sap.com/questions/12771124/smarteditaddon-hybris-63-not-working.html that is also related to SmartEdit.
The last answer is:
It seems that the buildcallbacks.xml in my storefront was not up to date. I compared it to the one in yacceleratorstorefront, added the missing parts and then (after additionally adding some missing files), the build was running without problems.
But we don't have a yacceleratorstorefront in our project. So I compared the yacceleratorstorefront/buildcallbacks.xml with our ourcustomercommerwebservices/buildcallbacks.xml but without success.
Do you have some ideas?
Thanks for your help!
Cheers Philipp
I managed it to make it work. I have removed the smarteditaddon from the localextensions.xml and don't run the addon install. It seems that smartedit don't need the smarteditaddon for spartacus…
Related
I recently migrated my app from AppCompat to Androidx but now I'm facing a serious issue with GlideApp. Whenever I try building the project, it shows compilation failed.
I tried changing the following import statements,
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
in the build folder to:
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
But whenever I rebuild it just regenerates the former import statement and returns the following errors:
error: package android.support.annotation does not exist error:
cannot find symbol class NonNull
I found the fix by adding annotationProcessor 'androidx.annotation:annotation:1.1.0' to my dependencies in app build.gradle and was able to build the project with no errors.
Got the solution from here: https://github.com/bumptech/glide/issues/3080#issuecomment-426331231
I want to use dask.read_fwf(file), but I get there error
AttributeError: module 'dask' has no attribute 'read_fwf'
The same problem occurs for read_csv and read_table.
I have uninstalled and reinstalled dask, as well as trying to rename my 'csv.py' file in \dask\dataframe\io. The same problem occurs after both of these attempted fixes.
pd.read_fwf and the like work fine.
You wanted dask.dataframe.read_fwf
import dask.dataframe as dd
dd.read_fwf
I'm trying to integrate a Cython module into my project and I'm having trouble getting it to compile correctly. I have traced my problem to this minimal example:
Say I have two files a.py and b.pyx located in the same directory, if I then do the following in a.py:
import pyximport; pyximport.install()
import b
Then everything works fine, b.pyx is compiled and imported successfully.
But if I instead do this in a.py, assuming that a.py and b.pyx are located in dir1/dir2:
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
import pyximport; pyximport.install()
import dir1.dir2.b
(which is somewhat nonsensical in this example but illustrates what's preventing me from importing a from elsewhere in my module hierarchy), I get the following exception:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 888, in _find_spec
AttributeError: 'PyxImporter' object has no attribute 'find_spec'
Is this expected behaviour or is something wrong with my installation? (I'm on Windows 10)
NOTE: there is another question with a very similar title on SO which does not answer my question at all.
I had this error message (though not necessarily the same path situation) and it was resolved by upgrading Cython from 0.28.5 to 0.29.
I try to run a Python code for face detection using Dlib. But when I try to load the file shape_predictor_68_face_landmarks.dat using the following command
face_detector =dlib.cnn_face_detection_model_v1('shape_predictor_68_face_landmarks.dat')
I get the following error:
Traceback (most recent call last):
File "face_detector.py", line 6, in <module>
face_detector = dlib.cnn_face_detection_model_v1('shape_predictor_68_face_landmarks.dat')
RuntimeError: An error occurred while trying to read the first object from the file shape_predictor_68_face_landmarks.dat.
ERROR: Error deserializing object of type unsigned long
while deserializing object of type std::string
I have downloaded the shape predictor file from github: https://github.com/davisking/dlib-models
This is my Python code
import dlib
import cv2
face_detector = dlib.cnn_face_detection_model_v1('shape_predictor_68_face_landmarks.dat')
The rest of the code is omitted because it's not necessary
I am using:
Ubuntu 18.04 and Python 3.6
UPDATE 1:
If use the same file with the function dlib.shape_predictor(shape_predictor_68_face_landmarks.dat) it runs without any problems!
It seems that there is a problem with the function dlib.cnn_face_detection_model_v1. Please correct me if I'm wrong!
I have contacted Davis King on twitter and he tshape_predictor_68_face_landmarks.dat is not the correct file.
I have to load mmod_human_face_detector.dat file for function dlib.cnn_face_detection_model_v1()
It must be called like this
face_detector = dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')
Trying to import the gpars withPool method into my project. The import works in groovyconsole but not when building in gradle.
Both groovyconsole and gradle are running groovy version 2.4.5
Any ideas?
Groovy Console
import static groovyx.gpars.GParsPool.withPool
withPool(2) { (1..5).collectParallel { println it.toString() } }
Output:
1
3
2
4
5
Result: [null, null, null, null, null]
Gradle compileGroovy
Same import step as above:
import static groovyx.gpars.GParsPool.withPool
Gradle output:
:compileGroovystartup failed:
C:\Programming\Projects\groovy\src\main\groovy\lib.groovy: 18: unable to resolve class groovyx.gpars.GParsPool
# line 18, column 1.
import static groovyx.gpars.GParsPool.withPool
^
1 error
FAILED
If you wish to import something into your build script, then you have to provide it as a build script dependency, in order to make Gradle know, where to find it, just like:
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath group: 'org.codehaus.gpars', name: 'gpars', version: '1.1.0'
}
}
import static groovyx.gpars.GParsPool.withPool
If you navigate to the location where groovy is installed - might be under $GROOVY_HOME and list the folders you'll notice the lib folder. Listing the content of the lib folder shows that gpars-1.2.1.jar is present there (groovy v2.4.5).
All these jar file located in lib folder are added to classpath when groovy is started via groovysh or groovyConsole.
However this doesn't happen when it comes to gradle and as #Stanislav answered you need to add it to classpath manually.