Not finding import image file - magento

I tried to import bulk image dataflow profile,
this is my export format:
this is my import format :
this is my excel format in which I export,
then I import the exported excel file and get the following error:

Step1: Create import folder inside media folder
Step2: manage you csv file , Only add "/imagename.jpg" in your images
columns

Related

Accessing streaming data from ADLS in PyFlink

Attempting a Pyflink stream setup from ADLS and currently trying to read a json file using the StreamExecutionEnvironment.from_source() method.
Here's how the code looks like:
from flink.plan.Environment import get_environment
from pyflink.datastream.functions import SourceFunction
from pyflink.datastream import StreamExecutionEnvironment, RuntimeExecutionMode
from pyflink.datastream.connectors.file_system import (FileSource, StreamFormat, FileSink,
OutputFileConfig, RollingPolicy, BucketAssigner)
from pyflink.common import WatermarkStrategy, Encoder, Types
from azure.storage.filedatalake import FileSystemClient
file_system = FileSystemClient.from_connection_string(connection_str, file_system_name="my_fs")
# setting the stream environment object
env = StreamExecutionEnvironment.get_execution_environment()
env.set_runtime_mode(RuntimeExecutionMode.STREAMING)
env.add_jars("file:///opt/flink/plugins/azure/flink-azure-fs-hadoop-1.16.0.jar")
env.add_classpaths("file:///opt/flink/plugins/azure/flink-azure-fs-hadoop-1.16.0.jar")
file_client = file_system.get_file_client(my_file)
input_path = 'abfss://' + file_client.url[8:]
print('URL is ===== >>>>',file_client.url)
# Source
ds = env.from_source(
source=FileSource.for_record_stream_format(StreamFormat.text_line_format(),
input_path)
.process_static_file_set().build(),
watermark_strategy=WatermarkStrategy.for_monotonous_timestamps(),
source_name="file_source"
)
ds.sink_to(
sink=FileSink.for_row_format(
base_path=output_path,
encoder=Encoder.simple_string_encoder())
.with_bucket_assigner(BucketAssigner.base_path_bucket_assigner())
.build())
ds.print()
env.execute()
I am getting below error:
Caused by: org.apache.flink.core.fs.UnsupportedFileSystemSchemeException: Could not find a file system implementation for scheme 'abfs'. The scheme is directly supported by Flink through the following plugin(s): flink-fs-azure-hadoop. Please ensure that each plugin resides within its own subfolder within the plugins directory. See https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/filesystems/plugins/ for more information. If you want to use a Hadoop file system for that scheme, please add the scheme to the configuration fs.allowed-fallback-filesystems. For a full list of supported file systems, please see https://nightlies.apache.org/flink/flink-docs-stable/ops/filesystems/.
Jar file has already been added in to the plugins folder as given in the documentation:
https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/filesystems/plugins/
Also, storage account key is also added into the config.yaml file.
Alternatively tried adding the source as DataStream using :
ds = env.read_text_file(input_path)

Conversion of TFGPT2LMHeadModel to pb file

I have trained a customized GPT2 model using TFGPT2LMHeadModel and it works fine.
However, I have to put it in production and the keras h5 file has a poor performance.
Consequently, the best option is to convert the h5 file to a pb file.
Tensorflow has already such feature:
from transformers import TFGPT2LMHeadModel
import tensorflow as tf
initial_model = TFGPT2LMHeadModel.from_pretrained(model_link)
tf.saved_model.save(initial_model, 'model_pb_folder')
Which works fine.
I get a pb file as expected.
However, I can't load it using the same TFGPT2 function:
pb_model = TFGPT2LMHeadModel.from_pretrained(model_pb_folder)
It has the following error:
OSError: Error no file named tf_model.h5 found in directory
C:/.../model_pb_folder but there is a file for PyTorch weights. Use
from_pt=True to load this model from those weights.
Is there a solution to use a TFGPT2 model with a pb file instead of h5 file?

How to Access Settings file from .py file - DRF

This is my project structure. I am trying to access settings.py file from lookups.py
I am importing using following code,
import os
import sys
import django
sys.path.append('/path/to/django/project')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'manageemployee.settings')
django.setup()
from manageemployee.apps.employee.hrmmongodb import DBMixin
from manageemployee.settings import EVENT_STORE_DICT
But I am getting the following error,
ModuleNotFoundError: No module named 'manageemployee'
It's better to use settings by importing the object django.conf.settings wherever it was needed instead of the settings file itself as you are trying,
Example:
from django.conf import settings
if settings.DEBUG:
# Do Something
So in your use case:
from django.conf import settings
EVENT_STORE_DICT = settings.EVENT_STORE_DICT
# Do Something
Note that django.conf.settings isn’t a module – it’s an object. So
importing individual settings is not possible:
from django.conf.settings import DEBUG # This won't work.
You can also find the detailed information in the Docs

How to setup Firefox to download files without prompt during Katalon test execution?

I am trying to create a very simple Katalon test case that opens Firefox, goes to given URL and clicks a button to download a file. I have set up Desired Capabilities according to the Katalon documentation (https://github.com/katalon-studio/docs/blob/master/pages/katalon-studio/docs/introduction-to-desired-capabilities.md) but with no luck. When I try to download a file prompt shows up and file is not downloaded. How can I disable the prompt and download the file immediately instead?
Software versions, source code and screenshots below.
Windows 10, Katalon Studio 7.2.1, Mozilla Firefox 72.0.2, Selenium 3.141.59
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser('https://file-examples.com/index.php/text-files-and-archives-download/')
WebUI.click(findTestObject('downloadCsvFileButton'))
For Chrome the default setup of Desired Capabilities in Project Settings works fine, but for Firefox I had to do some workaround to make it work.
So, I found this topic https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/15 and #kazurayam 's reply helped me to create a script that initializes WebDriver which I call before each test case:
import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.firefox.ProfilesIni
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()
switch(executedBrowser) {
case WebUIDriverType.FIREFOX_DRIVER: // "Firefox"
System.setProperty('webdriver.gecko.driver', DriverFactory.getGeckoDriverPath())
FirefoxOptions options = new FirefoxOptions()
options.addPreference('marionette', true)
options.addPreference('browser.download.folderList', 2)
options.addPreference('browser.helperApps.alwaysAsk.force', false)
options.addPreference('browser.download.manager.showWhenStarting', false)
options.addPreference('browser.download.dir', GlobalVariable.downloadPath)
options.addPreference('browser.download.downloadDir', GlobalVariable.downloadPath)
options.addPreference('browser.download.defaultFolder', GlobalVariable.downloadPath)
options.addPreference('browser.helperApps.neverAsk.saveToDisk', 'application/download, application/octet-stream, text/csv')
WebDriver driver = new FirefoxDriver(options);
// let Katalon Studio to use the WebDriver created here
DriverFactory.changeWebDriver(driver)
break
default:
WebUI.openBrowser('')
}
Note to others, if you want to download different file types you have to specify all the required the MIME types in ‘browser.helperApps.neverAsk.saveToDisk’ preference. A list of MIME types can be found here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
Additionally, if the file is PDF you have to add one more preference:
options.addPreference('pdfjs.disabled', true)

import CSV to Neo4j on MAC OS

I am new to Neo4j, just wondering how I should address my CSV file to import to the Neo4j on MAC OS?
I have tried this:
LOAD CSV WITH HEADERS FROM "file://macintosh hd/desktop/alarm.csv" AS csvLine
Regards
You should put your file inside Neo4j's import directory. According to the documentation the import directory for macOS systems is ${HOME}/Documents/Neo4j/import.
Copy the file alarm.csv to ${HOME}/Documents/Neo4j/import.
Load the CSV file running LOAD CSV WITH HEADERS FROM "file:///alarm.csv" AS csvLine

Resources