Cannot install jinja2 with jython pip? - jinja2

I am using Windows 7 with Jython 2.7.0. I am able to run jython --version and pip --version in the bin directory and get back what I expect, 2.7.0 and 1.6, with a bunch of extra information.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\myUser>cd ../..
C:\>cd jython2.7.0/bin
C:\jython2.7.0\bin>pip --version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:37:50 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
pip 1.6.dev1 from C:\jython2.7.0\Lib\site-packages (python 2.7)
I try to install jinja2 with pip install jinja2 and have also tried it captialized since I saw that as well pip install Jinja2 and get the following
C:\jython2.7.0\bin>pip install jinja2
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:44:35 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
Downloading/unpacking jinja2
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x215 type=client open_count=1 channel=[id: 0x53d8a502, /192.16
8.1.59:64975 => pypi.python.org/199.232.36.223:443] timeout=15.0>)
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x216 type=client open_count=1 channel=[id: 0x3d4b1e67, /192.16
8.1.59:64976 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Cannot fetch index base URL https://pypi.python.org/simple/
←[0mGot this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handsh
ake (<_realsocket at 0x217 type=client open_count=1 channel=[id: 0x5f10319d, /19
2.168.1.59:64977 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Could not find any downloads that satisfy the requirement jinja2
←[0mCleaning up...
←[31mNo distributions at all found for jinja2
←[0m←[31mStoring debug log for failure in C:\Users\bkarabinchak\.pip\pip.log
←[0m
This line ←[31mNo distributions at all found for jinja2 makes me think there is no Jinja2 for jython, nor Cheetah which I also tried to install. I tried those as they were referenced here as jython HTML Templaters.
Can someone either 1) Help me troubleshoot installing jinja2 or 2) Recommend a HTML Template package that does exist for jython if jinja2/Cheetah do no work?

Related

WARNING: Name of the hazelcast schema location is incorrect, using default

The warning level logs we receive while starting our application are below,
[main()] starting... [OK] Sep 03, 2019 1:38:17 PM
com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the
hazelcast schema location is incorrect, using default WARNING: An
illegal reflective access operation has occurred WARNING: Illegal
reflective access by
com.hazelcast.internal.networking.nio.SelectorOptimizer
(file:/home/abc/def/ghe/lib/thirdparty/hazelcast-3.12.jar) to field
sun.nio.ch.SelectorImpl.selectedKeys WARNING: Please consider
reporting this to the maintainers of
com.hazelcast.internal.networking.nio.SelectorOptimizer WARNING: Use
--illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be
denied in a future release
How can ignore these WARNING logs or how can change log level INFO?
Or is there any way you know?
This warning would be thrown, if you have a version mismatch between the XSD version in your hazelcast.xml file and the version of hazelcast (hazelcast jar file) you use in your application.
Recently, one of the tester complaint about same warning. While investigation I have found that her hazelcast.xml file has some different version of XSD as given below :
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-
3.6.xsd">
Whereas in my machine, I was not getting that warning therefore, I just copy my namespace header as given below in her hazelcast.xml file and it fixed the problem for her.
<hazelcast
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.12.xsd">
So please make sure you use the same version of XSD url in your hazelcast.xml file as hazelcast jar version.
Try changing
<hazelcast-client xmlns:xsi="w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="hazelcast.com/schema/client-config hazelcast.com/schema/client-config/hazelcast-client-config-3.6.xsd"
xmlns="httt p://www.hazelcast.com/schema/client-config">
to
<hazelcast-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.12.xsd"
xmlns="http://www.hazelcast.com/schema/client-config">
It may be a cut&paste error, but in your comment the xmlns has 3 "t"s in the "http: section.
Or, since you're using 3.12, you could use YAML configuration.

How to connect kafka with MySQL on another Host?

My database is in another Linux node lets suppose xxx.xx.xxx.xxx:3306 and I am running the standalone command of kafka connect from my Windows machine. My server.properties code is
name=test-source-mysql-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:mysql://xxx.xx.xxx.xxx:3306/databasename?user=username&useSSL=false
&password=password
mode=incrementing
incrementing.column.name=columnname
topic.prefix=mysqlname-databasename-database-
I am Receiving the following error
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. D
ue to constraint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to
constraint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.RootResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constr
aint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.RootResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: The (sub)resource method createConnector in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotati
on.
WARNING: The (sub)resource method listConnectors in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.
WARNING: The (sub)resource method listConnectorPlugins in org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource contains empty path annotation.
WARNING: The (sub)resource method serverInfo in org.apache.kafka.connect.runtime.rest.resources.RootResource contains empty path annotation.
[2019-03-28 11:55:42,108] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone)
java.lang.IllegalArgumentException: Number of groups must be positive.
at org.apache.kafka.connect.util.ConnectorUtils.groupPartitions(ConnectorUtils.java:41)
at io.confluent.connect.jdbc.JdbcSourceConnector.taskConfigs(JdbcSourceConnector.java:148)
at org.apache.kafka.connect.runtime.Worker.connectorTaskConfigs(Worker.java:305)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.recomputeTaskConfigs(StandaloneHerder.java:307)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.updateConnectorTasks(StandaloneHerder.java:333)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:211)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:107)
Any help is appreciated.
The error Number of groups must be positive. indicates that Kafka Connect JDBC source has not found any tables/objects to fetch from the database. Looking at your config, you've not specified table.whitelist / table.blacklist so that could be why. Another reason would be if the user is not authorised to select from any of the available objects. This article goes into more detail.

PHP Parse Error: /vendor/cakephp/cakephp/src/I18n/functions.php on line 26

I've encountered this error in my apache2 error.log while accessing a project running on WSL.
[Tue Feb 28 14:42:17.331656 2017] [:error] [pid 25334] [client 127.0.0.1:52043] PHP Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /mnt/c/development/public_html/xxxx/vendor/cakephp/cakephp/src/I18n/functions.php on line 26
I'm running:
Cake 3.4.2
PHP 7.0.16-3+deb.sury.org~trusty+1
On Windows Subsystem for Linux
I have other cake projects working fine on this setup but none that are v3.4*.
I have no idea how to solve this problem as it's in the Cake core. Any advice on how to proceed from here would be great.
Please ask if you need any more info.
There is no 3.4.3 branch (yet)
There is no 3.4.3 branch (yet), double check that you are looking at the correct info. Maybe it was published by accident and has been retracted, if you really have version 3.4.3, try reinstalling your applications dependencies.
Ensure that PHP used by Apache PHP is up to date
Also make sure that your server is actually using the PHP version that you think it does, the Apache PHP module and the PHP CLI binary are two different things, and the FPM/CGI binary usually also isn't used on the CLI, ie the CLI and the server often times use different versions.
The error message you are referencing suggests that PHP couldn't handle the ... variadic function operator, which would mean that Apache is using a PHP version prior 5.6

Mercurial side-by-side configuration is incorrect

I'm trying to install and run x64 Mercurial 3.8.3, but I'm getting the following error:
D:\Program Files\Mercurial>hg.exe
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
Running sxstrace.exe gives the following log:
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = AMD64
CultureFallBacks = en-US;en
ManifestPath = D:\Program Files\Mercurial\hg.exe
AssemblyDirectory = D:\Program Files\Mercurial\
Application Config File =
-----------------
INFO: Parsing Manifest File D:\Program Files\Mercurial\hg.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\WINDOWS\WinSxS\manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9177_none_acd40623e1d81331.manifest
INFO: Begin assembly probing.
INFO: End assembly probing.
ERROR: Activation Context generation failed.
End Activation Context Generation.
It seems like it's looking for C:\WINDOWS\WinSxS\manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9177_none_acd40623e1d81331.manifest, which doesn't exist on my computer. I think this file comes from the Microsoft Visual C++ 2008 Redistributable Package (x64), but when I installed/repaired it I still get the same error.
I've also come across this same package from chocolatey, but its version history seems to indicate that its latest version is 9.0.30729.6161, not the 9.0.30729.9177 I'm looking for. I'm not sure where to find this version of the package.
I've already looked at these questions which seem very similar to my situation:
Side by Side configuration is incorrect error
Visual Studio 2012 Side by side configuration is incorrect
Edit: I've just reinstalled with x86 Mercurial and it works. Not ideal, but at least it's a workaround.
Microsoft Visual C++ 2008 Redistributable Package 9.0.30729.9177 doesn't seem to be publicly available, so I ended up reinstalling Windows. Now I can run Mercurial after installing it.

Using MySQL with dev_appserver (Google App Engine) and Google SQL Service

I am using Google App Engine and Google SQL Service, and would like to use the option
dev_appserver.py --mysql_user=username myapp
in order to use a local MySQL database for development purposes, and SQL Service in prod environment.
I have MySQLdb installed and working:
/usr/bin>>python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>
However, when I run the dev_appserver command, I get the following error:
zipimporter('/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg', 'MySQLdb/')
ERROR 2011-09-12 09:34:53,541 rdbms_mysqldb.py:90] The rdbms API is not available because the MySQLdb library could not be loaded.
I have verified that the MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg is in the location (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/) and that it is accessible.
Any idea what might be causing this error?
Full stacktrace provided below for information:
/Users/eddieboyd>>dev_appserver.py --debug --mysql_user=mysql eddiehelloworld
Warning: You are using a Python runtime (2.7) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production.
INFO 2011-09-12 09:34:53,290 appengine_rpc.py:159] Server: appengine.google.com
INFO 2011-09-12 09:34:53,304 appcfg.py:449] Checking for updates to the SDK.
DEBUG 2011-09-12 09:34:53,305 appengine_rpc.py:364] Sending HTTPS request:
POST /api/updatecheck?release=1.5.3&timestamp=1311108376&api_versions=%5B%271%27%5D HTTPS/1.1
Host: appengine.google.com
X-appcfg-api-version: 1
Content-type: application/octet-stream
User-agent: appcfg_py/1.5.3 Darwin/10.8.0 Python/2.7.2.final.0
INFO 2011-09-12 09:34:53,465 appcfg.py:466] The SDK is up to date.
WARNING 2011-09-12 09:34:53,465 datastore_file_stub.py:512] Could not read datastore data from /var/folders/++/++71vE++6+0++4RjPqRgNE+0Eyo/-Tmp-/dev_appserver.datastore
INFO 2011-09-12 09:34:53,478 py_zipimport.py:148] zipimporter('/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg', 'MySQLdb/')
ERROR 2011-09-12 09:34:53,541 rdbms_mysqldb.py:90] The rdbms API is not available because the MySQLdb library could not be loaded.
ERROR 2011-09-12 09:34:53,541 dev_appserver_main.py:638] <type 'exceptions.NotImplementedError'>: Unable to find the MySQLdb library. Please see the SDK documentation for installation instructions.
DEBUG 2011-09-12 09:34:53,543 dev_appserver_main.py:640] Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 635, in main
dev_appserver.SetupStubs(appinfo.application, **option_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 4668, in SetupStubs
rdbms_mysqldb.connect(database='')
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/rdbms_mysqldb.py", line 96, in connect
'Unable to find the MySQLdb library. Please see the SDK '
NotImplementedError: Unable to find the MySQLdb library. Please see the SDK documentation for installation instructions.
Poor man's solution.
I added
"import MySQLdb"
in dev_appserver.py.
It works now.
Ensure to use the latest version of the AppEngine SDK which currently is the version 1.6.2.
After that install the package for python mysql support: python-mysqldb.
Maybe your system does not have the MySQL module required. On Fedora 16 64 bits, I solved this by installing the MySQL python module:
yum install MySQL-python