Extension that allows previewing remote database tables in CKAN - plugins

I need connect and preview to a external mysql bbdd so I just installed for CKAN this extension (I have CKAN 2.7.3):
http://extensions.ckan.org/extension/dataproxy/
I followed step by step the tutorial and ckan habilitated the dataproxy buttom.
Firt I filled the form with the correct database and table name to connect with MySQL database but when I add the Database Proxy Explorer View, always alert the same error.
No module named MySQLdb par1
No module named MySQLdb part2
Information in mysqldb
I used python 2.7 and the module called MySQLdb
I tryed do same changes in the code but not successfully for example delete the module MySQLdb but its totally necesary for the plugin.

You have an ImportError for MySQLdb, so it sounds like you need to install that python library/module. Maybe you missed this step, or forgot to activate the virtualenv beforehand. Anyway this should do it:
. /usr/lib/ckan/default/bin/activate
pip install mysqlclient

Related

Jupyterlab-dash needs to be included in built on Binder but then throws an error

I am trying to launch a Binder rep and import JupyterDash into it.
The Binder built worked.
In my Binder rep
enter link description here
My yml is:
name: plotly_dash
channels:
defaults
dependencies:
python
ipykernel
seaborn
pandas
matplotlib
numpy
plotly
jupyter-dash
dash
chart-studio
nbformat
ipywidgets
openpyxl
jupyter_server_proxy
However, I get the message:
jupyterlab-dash needs to be included in built
On my machine locally this is also the case and not a problem and works.
In Binder it throws an error:
If you are experiencing the build failure after installing an extension (or trying to include previously installed extension after updating JupyterLab) please check the extension repository for new installation instructions as many extensions migrated to the prebuilt extensions system which no longer requires rebuilding JupyterLab (but uses a different installation procedure, typically involving a package manager such as 'pip' or 'conda').
If you specifically intended to install a source extension, please run 'jupyter lab build' on the server for full output.
As I see it JupyterDash is not prebuilt.
On
github.com/plotly/jupyter-dash
they say to include:
JupyterDash.infer_jupyter_proxy_config()
This does not work either and to make it work it requires some efforts on the server site, I guess. However I do not even think this would solve the problem.
What can I do to make the built work?
Thank you for any suggestions.
I posted this on Jupyter Discourse Forum too:
enter link description here

How to unlock TYPO's Install Tool (/typo3/install.php)?

After adding an empty text file called 'ENABLE_INSTALL_TOOL" in the 'typo3conf' folder the Install Tool is still locked when I visit hostname/typo3/install.php.
Some background information: I just uploaded all TYPO3 files to a remote host and am trying to get it to display the TYPO3 website. When I logged into the backend I got the following error:
1533822084 TYPO3\CMS\Core\Crypto\PasswordHashing\InvalidPasswordHashException
Configured default hash method
TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash is not available. If the instance has just been upgraded, please log in to
the standalone install tool at typo3/install.php to fix this. Follow
the wiki link for more details.
This error referred to this wiki page: https://wiki.typo3.org/Exception/CMS/1533822084
Here it is suggested to:
Call the standalone install tool and log in once. This should detect that argon2i is not available and will configure a different default hash mechanism. A backend login should be possible afterwards.
Which is what I am stuck on since the Install Tool is locked.
When you visit for the first time the address https://yoursite.com/typo3/install.php you should see the following screen:
As you wrote, you have to add a file ENABLE_INSTALL_TOOL (without extension) in the folder /typo3conf/ of your TYPO3 installation; the file can be empty.
After you have done that and refreshed the same page, you should see:
If you have not changed it (which is recommended) , the password should be the same password as the one of the first administrator user you have created during the installation.
If you have changed it and don't remember it, follow the on screen instructions.
Please refer to the official installation guide:
https://docs.typo3.org/m/typo3/guide-installation/master/en-us/QuickInstall/GetAndUnpack/Index.html
You need SSH access to your remote server. FTP or SFTP is not enough because the symlinks are not uploaded.
You need to transfer a zip- or tar.gz-file to the server and unpack it there. Never unpack them on your machine and transfer the files to the server.
I had same issue in Typo3 10 in CentOS 8
The argon2 password hash algorithm only in PHP >= 7.4, not in previous versions in CentOS 8.
In 7.2 / 7.3, argon2 is part of the "standard" extension and is disabled in RH build as libargon2 is not available in RHEL / CentOS
So if you can upgrade to PHP 7.4 it would work.
Alternative method when in PHP 7.3
in LocalConfiguration.php set
'installToolPassword' => '$2y$12$kB0JLQcbADywtxtxjoBoUOrCSk0RHhh/zuKDbFrtAYlr8fUlZ/1Em',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\BcryptPasswordHash',
Open install tool ursite/typo3/install.php
password is 'password' (installToolPassword hash value above)
Now create an new admin and use that to login to backend and reset the passwords of other admins

memcached not getting loaded for php7

I am using Easyphp-DevServer-17 and PHP7 ,I want to use "memcached" with PHP-7.1 , I downloaded memcached dll files from the following link
php 7 memcahced
I tried adding dll files to ext folder in php 7 but phpinfo file
doesn't reflect it
and i tried following code
$servers = array(array('localserver', 11212));
$memcacheD = new Memcached;
but it throws following error "Fatal error: Uncaught Error: Class 'Memcached' not found"
Please help me on this issue as i am new to php and struggling to load memcached extension
First of all ensure you have the correct version of memcacheD. Most of the versions for Windows out there are memcache, without the D at the end, even the name of the libraries are called memcacheD. It's very misleading but I have added the link to the correct version below. To clarify, memcache and memcacheD are not the same and cannot be interchanged.
Run phpinfo() and make notations of Compiler, Architecture, Thread Safety, you will need this to get the correct version of the DLL.
Download the correct memcacheD version from https://github.com/lifenglsf/php_memcached_dll There are 2 files, the php extension DLL and the lib DLL. You need both.
Save the php extension DLL in your easyPHP folder, in my case was \eds-binaries\php\php713vc14x86x220414190951\ext.
Enable the extension in php.ini, I renamed the DLL so in my case I had to add the line extension=php_memcached.dll
Save libmemcached.dll in C:\windows
Reload Apache to ensure the config is refreshed.
And that's it. Now run phpinfo() again and should show there. If it's not working check Apache error log, it will tell you if the DLL failed to load. If you get the "not a Win32 application" message it means you didn't download the correct DLL.
Remember you also have to have the service running, memcached.exe -d start from cmd should do.

Calling AS400 DB from .Net Core

I have a .Net Core WebAPI, and I have the IBM.Data.DB2.Core package installed.
When I try to call the DB2Connection constructor with a connection string, I'm getting the following error.
Unable to load DLL 'db2app64.dll': The specified module could not be found.
Is this something that should be included with the DB2.Core package? Is there a better way to call an AS400 DB from .Net Core?
My code looks like this:
DB2Connection conn = new DB2Connection("Server=as400.example.com;Database=CLIENTS01;UID=user1;PWD=password1;");
If you are using the .NET Core package, you will have to include the path to the driver (which is included in the NuGet package) in your PATH variable.
Here's the relevant part of the FAQ on the NuGet package on Developer Works:
Q: Do I need to do any additional configuration for using this
configuration.
Yes, On Windows :
if C:\Users\<USERNAME>\ is the NuGet package folder then
add to the path: C:\Users\<USERNAME>\.nuget\packages\IBM.Data.DB2.Core\1.0.0.100\build\clidriver\bin
and On Linux:
append $HOME/.nuget/packages/IBM.Data.DB2.Core-lnx/1.0.0.100/build/clidriver/lib
to the LD_LIBRARY_PATH.
I've found the easiest way to get it set is to set the PATH variable in your project settings. Check out this blog post about some different ways you can do that.
In fact, this other Developer Works page says:
Instructions for downloading and using the package
The following are the prerequisites for using the package
Any other IBM DB Drivers should not be present in the machine.
Path/LD_LIBRARY_PATH needs to be updated to include the package driver path.
you need to install the IBM Data Server Driver Package wich you can get over there
http://www-01.ibm.com/support/docview.wss?uid=swg24038920
it includes the dependencies you are missing

Fabfile with support for sqlalchemy-migrate deployments?

I have database migrations (with sqlalchemy-migrate) working well in my dev environment. However, I'm a little stumped about how to integrate this into my deployment process.
I'd like to use fabric to execute the manage.py file on the remote server but I'm not sure what to use for the repository value in this file. Referring to both 'appname/migrations' and '/usr/local/pylons/appname/env/lib/python2.6/site-packages/appname-05.egg/appname/migrations/'
both fail with a migrate.versioning.exceptions.InvalidRepositoryError
Does anyone have a fabfile and manage.py that plays nicely with sqlalchemy-migrate?
What I did was to generate a manage.py file per the sqlalchemy-migrations docs. In there I hacked it up to load our config information which includes the db auth info. In our case it's a Pylons app so it reads the proper Pylons config.ini file.
http://readthedocs.org/docs/sqlalchemy-migrate/en/latest/versioning.html#project-management-script
Then the fabric commands all interact with the manage.py file vs using the Python API directly. Since everything, from the SA-Migrate manage.py through the app itself I don't run into any sort of path issues like you mention.
Not sure this is a 'exact' fix but maybe helps.