HI Victor,

Are you running CouchDB from your command line?

If you're running it as a service, you'll need to get that environment
variable into the context for the process.

You might do better to

# chmod +x /usr/bin/couchpy

and ensuring the first line is a "shebang" of the form:

#!/usr/bin/python

or

#!/usr/bin/python3

and then make sure this is in your CouchDB running process's

export COUCHDB_QUERY_SERVER_PYTHON="/usr/bin/couchpy"

instead of running python3 and passing it the couchpy script.

If you're on Linux, look in the /proc/<pid>/environ "file" to see if the
variable actually is getting set on your beam.smp CouchDB process.

-Joan

On 2019-05-13 17:46, Victor CORREIA wrote:
> Thanks Joan for your anwser.
> 
> I 've readed release notes ;-), it isn't in production platform, it's in dev.
> I'm testing couchdb 2.3.1 before upgrade critical environment.
> 
> until 2.2.1 , we used pycouchdb to generate our views in python2.
> in local.ini, i had:
> 
> [query_servers]
> python = /usr/bin/couchpy
> 
> now in couchdb 2.3.1, i must export environment variable, in my case:
> COUCHDB_QUERY_SERVER_PYTHON="/path/to/python/query/server.py with args"
> 
> i tried to put COUCHDB_QUERY_SERVER_PYTHON="/usr/bin/python3 /usr/bin/couchpy"
> i have modified in ~.bashrc for use python3 by default
> 
> but no success, so pycouchdb is compatible with views management in
> couchdb 2.3.1 ?
> if yes can you help me too resolv my problem .
> 
> thank you for your answers and comments..
> 
> Victor.
> 
> Le lun. 13 mai 2019 à 18:49, Joan Touzet <woh...@apache.org> a écrit :
>>
>> Hi Victor,
>>
>> The way external view servers are invoked has changed in 2.3.x and up,
>> due to security reasons. You should always read the release notes before
>> blindly upgrading.
>>
>> The release notes for 2.3.x are here:
>>
>> http://docs.couchdb.org/en/stable/whatsnew/2.3.html#upgrade-notes
>>
>> -Joan
>>
>> On 2019-05-13 10:45, Victor CORREIA wrote:
>>> Hi couchdb Users.
>>>
>>> I used couchdb and i was upgraded couchdb from 2.2.1 to 2.3.1 , but pb
>>> my python views don't works.
>>>
>>> I have try to change like doc , but no success.
>>>
>>> export COUCHDB_QUERY_SERVER_PYTHON="/path/to/python/query/server.py with 
>>> args"
>>>
>>> I tried;
>>> I have install python3.
>>> export COUCHDB_QUERY_SERVER_PYTHON="/usr/bin/python3 /usr/bin/couchpy"
>>>
>>> but i have Error running query. Reason: (unknown_query_language)
>>> python, on Fauxton when i try  my custom views.
>>>
>>> do you have an example or more information to resolv my problem  ?
>>>
>>> thanks..
>>>
>>> Victor.
>>>
>>

Reply via email to