I am getting an error while opening a .pickle file in itellij - pickle

The file is in the same directory. The path is correct.

Try to remove "../Deep-Learning/" and use only "cnn_min_max.pickle" as path

Related

Is there a standard way to get LOAD INFILE working?

Load data infile has always been a pain in the ass to set up and there does not seem to be standard way to get it to work but I have always been able to get it to work ….eventually except now.
I am struggling with
Error Code: 29. File '/loadinfile/file.csv' not found (OS errno 13 - Permission denied)
The system is as follows:
MySQL version 8.0.29-0ubuntu0.22.04.2
Ubuntu 22.04
The load file directory is owned by mysql:mysql and same with the file and I have tried chmod 757 and even 777
In the config file I have tried the following variations:
secure_file_priv = "/loadinfile/"
secure_file_priv = '/loadinfile/'
secure_file_priv = ""
secure_file_priv = ''
The following is also set :
[mysqld]
local-infile = 1
[client]
loose-local-infile=1
Changing
LOAD DATA INFILE '/loadinfile/file.csv' INTO TABLE table
to
LOAD DATA LOCAL INFILE '/loadinfile/file.csv' INTO TABLE table
changes the error message to:
Error Code: 2. File '\loadinfile\file.csv' not found (OS errno 2 - No such file or directory)
Error Code: 2. File '\loadinfile\file.csv' not found (OS errno 2 - No such file or directory)
Above message indicates that your directory where the file is located is wrong! You must define the full path:
For example In Mac If your file resides on Desktop,It must be like this :
LOAD DATA LOCAL INFILE '/Users/computer_name/Desktop/filename.file_extension' INTO TABLE table
In windows
LOAD DATA LOCAL INFILE 'C:\Users\computer_name\Desktop\filename.file_extension' INTO TABLE table
I hope It solves your problem.
Error Code: 2. indicates invalid file path. Keep the LOCAL INFILE option and either specify the full path of the CSV file or make sure the CSV file path is correct. give it a try with Full path and see if it solves the problem or not.
From MySQL Docs
If LOCAL is specified, the file must be located on the client host.
The client program reads the file, locating it as follows:
If the file name is an absolute path name, the client program uses it
as given.
If the file name is a relative path name, the client program looks for
the file relative to its invocation directory
Edited
Make sure your mysqld.cnf or your main MySQL config file has the following variables
secure_file_priv = ""
local_infile=1
And your Global variable local_infile is OFF, turn it ON.
you can check that if you run this query
SHOW GLOBAL VARIABLES LIKE 'local_infile';
if it is OFF, turn it ON
And lastly, Make sure you restart your SQL service to reflect the changes. you can do that if you execute
service mysql restart
Hope that solves your problem

Impossible to retrieve files from an FTP in WinSCP - Bad message

I use WinSCP 5.17 to retrieve files from an FTP, when I retrieve files from the root folder of the FTP all works, but as soon as I try to retrieve the files from the sub-folder it doesn't work.
Here is the instruction I use:
get /Clients/Folder2/Folder3/*.* F:\folder1\folder2\
and this is the error message:
Error listing directory '/Clients/Folder2/Folder3'.
Bad message (badly formatted packet or protocol incompatibility).
Error code: 5
Error message from server: Bad message
Thanks for your help.
Finally I solved the problem, I generated the script from WinSCP GUI and it works.
open ftps://username:password#ftp-adresse.azure.com/ -certificate="ee:5f:af:7c:26:6b:bb:6f:cd:86:6a:2c:03:1e:8f:ab:e7:63:fd:43" -rawsettings FollowDirectorySymlinks=1
cd /Clients/folder2/folder3
lcd "F:\folder1\folder2"
get "*.xlsx"
exit

jmeter.functions.FileToString not finding file location

In JMeter I am passing multiple JSON inputs as body, Variable name is defined as JSON_FILE and coming from CSV Data Config
${__FileToString(${__eval(${JSON_FILE})}.json,,)}
CSV Data
designO1015643320
.
.
designO1077673985
designO1088516727
Running load test from Jmeter UI works fine, but running as mvn project is giving error about FileNotFoundException even though .csv file and .json files are in same folder as .jmx file
Error from .jmx.log:
WARN - jmeter.functions.FileToString: Could not read file: designO1015643320.json File 'designO1015643320.json' does not exist java.io.FileNotFoundException: File 'designO1015643320.json' does not exist
Response in .jtl:
httpSample t="4" lt="0" ts="1508530091457" s="false" lb="CreateDesign_PUT" rc="Non HTTP response code: org.apache.jorphan.util.JMeterStopThreadException" rm="Non HTTP response message: End of sequence" tn="Design_APIs 1-1" dt="text" by="1822" ng="1" na="1"/>
JMeter GUI default relative path is the bin folder
Relative paths are resolved relative to the current working directory (which defaults to the bin/ directory).
Maven search in different default path for files src/test/jmeter directory
See guide:
in the src/test/jmeter directory. When running the project, the JMeter Maven plugin searches for tests to run in this directory.
And you can find this path dynamically
I heard Groovy is a new black so I would recommend replacing your __FileToString() function with __groovy() function, the Groovy equivalent of dynamically getting the file path relative to Maven's plugin current working directory would be something like:
${__groovy(new File(org.apache.jmeter.services.FileServer.getFileServer().getBaseDir() + System.getProperty('file.separator') + vars.get('JSON_FILE') + '.json').text,)}
See JavaDoc on FileServer class for more details.

Neo4j load csv error : Couldn't load the external resource

I am using Neo4j3.0.1 and for loading a csv file
LOAD CSV WITH HEADERS FROM 'file:///D:/dummy.csv' as line
CREATE (:myData {line})
But it throws an error :
Couldn't load the external resource at: file:/D:/dummy.csv
Note : I've already tried configuring neo4j.conf which was described here
Suggest any other alternative besides placing csv file into import folder.
Try setting dbms.directories.import to D: in neoj4.conf
dbms.directories.import=D:
and after run
LOAD CSV WITH HEADERS FROM 'file:///dummy.csv' as line
CREATE (:myData {line})
EDIT:
As shown in comments the problem was solved by changing the owner of the CSV file location directory, as described in this answer.
sudo chown neo4j:adm <csv file location>

SOURCE error 2?

When i try to source an sql file i get the error:
mysql> source C:/Users/tom/Documents/insert.sql
ERROR:
Failed to open file 'C:/Users/tom/Documents/insert.sql', error: 2
I have checked the file path, which looks fine to me. I have also tried \. C:/Users/etc
I am trying to source the sql file which holds insert statements for particular tables. All the statements in the file work when entered manually. What else could i be doing wrong?
Have tried using both backslash and forward slash when using this command
Probably a problem of access right on the file (the file is being accessed by the mysqld server process, not yourself). Try placing the file into the data folder of MySQL, then import it from this location. The location of data folder depends on your distribution and on your own configuration.
Alternatively, feed the SQL script directly to your mysql client's stdin:
mysql [all relevant options] your_database < C:\path\to\your\script.sql
I am using Ubuntu 14.04 version.
I too faced below error 2.
mysql> SOURCE home/loc/Downloads/AllTables.sql;
Failed to open file 'home/loc/Downloads/AllTables.sql', error: 2
Solution :
mysql> SOURCE /home/loc/Downloads/AllTables.sql;
Just added a '/' in front of home
Hope this helps some one.
Have you checked if the file exits? I have had this problem before.
This:
this:
and this works: