How to specify image path relative to module in Knockout HTML view?

I’m making a magento 2, usign 2.2.6, module trying to display certain information at the checkout and I’m stuck when trying to add an image relative to the module path.

I’m NOT using PHTML in this case, and I’m trying to don’t have to

FYI: I’ve read the question How to specify skin image path in Knockout HTML template?

And this one is for obtaining images relative to the theme path, not to the module.

Magento2 custom module installed but not working

have created a module and it works fine on staging and locally but not on live. The module is installed correctly and enabled. The live config.php and the staging config.php are the same. I used the live db on staging and it is working fine which means is not a db problem. Also cleared the cache. In my custom module I have a before plugin for Magento\Checkout\Controller\Onepage\Success execute() and overriten Iways\PayPalPlus\Controller\Order\Create.php. Looks like the code is never executed. Does anyone know what might be the problem?

How to fix ‘ModuleNotFoundError: No module named ‘tensorflow._api’ in Python 3.6.5 I am using keras api for the same and keep getting this error

~\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py in <module>()      37   print('tf.estimator package not installed.')      38  ---> 39 from tensorflow._api.v1 import app      40 from tensorflow._api.v1 import bitwise      41 from tensorflow._api.v1 import compat  ModuleNotFoundError: No module named 'tensorflow._api' 

This is the error I keep receiving every time I try to run my code.

I have tried reinstalling tensorflow from https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.12.0-cp36-cp36m-win_amd64.whl but every time I get the above error.

import tensorflow as tf from tensorflow.keras.callbacks import TensorBoard from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten from tensorflow.keras.layers import Conv2D, MaxPooling2D import pickle 

these are the libraries I am importing.

Error reading “pickle” file, no module named ‘Data’

I tried to read pickle file using Anaconda Navigator and have the following script.

import pickle import sys, os   with open('pickle1', 'rb') as fp:     data_new = pickle.load(fp) 

After running the window I get the following error window.

--------------------------------------------------------------------------- ModuleNotFoundError                       Traceback (most recent call last) <ipython-input-4-047bee0f1247> in <module>()       3        4 with open('pickle1', 'rb') as fp: ----> 5     data_new = pickle.load(fp)  ModuleNotFoundError: No module named 'Data' 

Can you please help me fix this issue? I tried to rename file to *.pkl, and *.csv formats, but it did not help. Original data file has no extension of its own.

ImportError: No module named tensorflow

Estoy en Windows 10. Mientras ejecutaba un archivo en el indicador de Anaconda, tenía un ImportError: No module named tensorflow.

(moo_env) C:\Users\antoi\Documents\Programming\projects\moodbot>python train_init.py Using TensorFlow backend. Traceback (most recent call last):   File "train_init.py", line 17, in <module>     agent = Agent('mood_domain.yml', policies = [MemoizationPolicy(), KerasPolicy()])   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_core\policies\keras_policy.py", line 28, in __init__     import keras   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\keras\__init__.py", line 3, in <module>     from . import utils   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\keras\utils\__init__.py", line 6, in <module>     from . import conv_utils   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>     from .. import backend as K   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\keras\backend\__init__.py", line 89, in <module>     from .tensorflow_backend import *   File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>     import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' 

Sin embargo, lo tengo en la variable de entornos de navegador de Anaconda :

introducir la descripción de la imagen aquí

install IIS managed module

I have just migrated a web site from one server to another (by using the IIS export/shared configuration feature).

When I try to submit a post to my website, I get HTTP 503. When I go to the event viewer, I see an error that starts with:

IISMANAGER_ERROR_LOADING_PROVIDER_TYPE IIS Manager could not load type ‘Microsoft.Web.Management.Delegation.DelegationModuleProvider, Microsoft.Web.Management.Delegation.Server, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35’ for module provider ‘DelegationManagement_Current’ that is declared in %windir%\system32\inetsrv\config\administration.config. Verify that the type is correct, and that the assembly that contains the module provider is in the Global Assembly Cache (GAC).

I found this post: IIS Manager could not load type 'Microsoft.Web.Management, which explains that I need to install a missing module. The answer to that post says I should install the missing module by either downloading it from iis.net or using Web Platform Installer.

Can anyone give further details on how to install the module? I’ve tried searching iis.net and WPI for the type/assembly names, but I get no results.

The types and assemblies of the missing modules are:

type: Microsoft.Web.Management.Delegation.DelegationModuleProvider

  • assembly: Microsoft.Web.Management.Delegation.Server

type: Microsoft.Web.Deployment.UI.PackagingModuleProvider

  • assembly: Microsoft.Web.Deployment.UI.Server

type: Microsoft.Web.Management.Iis.Rewrite.RewriteModuleProvider

  • assembly: Microsoft.Web.Management.Rewrite

Terraform , need help to import existing ressource to a module ressource

I would like to import an existing ressource into my module.

This is my “old” vpc file: https://pastebin.com/DVsacfwt My new one using the terraform registery vpc module: https://pastebin.com/KDrA0Db3

I’m in my directory, I copy my file where I use the module, I execute terraform plan and Terraform tell me that it need to create 10 new ressources https://imgur.com/a/JbbPi48 which is NORMAL because I didn’t migrate my vpc into my module.

Then I run terraform state mv aws_vpc.vpc-demosubs module.vpc-demosubs.aws_vpc.this https://imgur.com/a/wzO8KXq

When I execute terraform plan again, Terraform need to create and destroy new ressources…https://imgur.com/a/cM0wZLm

Do you have an idea ? Thanks for your help

How can I change the css attributes of the sub-item of theme template in my custom module?

I use the system built-in block of “User account menu” in my page. The twig file is core/themes/classy/templates/navigation/menu.html, and this is the html output:

<ul class="menu">     <li class="menu-item">         <a href="/en/user" data-drupal-link-system-path="user">My account</a>     </li>     <li class="menu-item">         <a href="/en/user/logout" data-drupal-link-system-path="user/logout">Log out</a>     </li> </ul> 

But what I really want to get is like this, just simply remove the little black dot before each <li> element:

<ul class="menu">     <li class="menu-item" style="list-style: none">         <a href="/en/user" data-drupal-link-system-path="user">My account</a>     </li>     <li class="menu-item" style="list-style: none">         <a href="/en/user/logout" data-drupal-link-system-path="user/logout">Log out</a>     </li> </ul> 

How can I do that in my custom module without change the core twig template?

I’ve tried this which only change the style for the top element of <ul>, the black dot before each <li> still exists:

function xylogin_preprocess_menu(&$  variables) {   $  variables['attributes']['style'][] = "list-style:none;"; }