I've just installed couchapp from the instructions and have gone through the Getting Started tutorial. When I run couchapp push I get an error like this:
2012-06-23 14:05:08 [CRITICAL] unknown error [[Errno 22] Invalid argument]
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/couchapp/dispatch.py", line 48, in dispatch
return _dispatch(args)
File "/Library/Python/2.6/site-packages/couchapp/dispatch.py", line 92, in _dispatch
return fun(conf, conf.app_dir, *args, **opts)
File "/Library/Python/2.6/site-packages/couchapp/commands.py", line 76, in push
dbs = conf.get_dbs(dest)
File "/Library/Python/2.6/site-packages/couchapp/config.py", line 146, in get_dbs
return [Database(dburl, use_proxy=use_proxy) for dburl in dburls]
File "/Library/Python/2.6/site-packages/couchapp/client.py", line 223, in __init__
self.res.head()
File "/Library/Python/2.6/site-packages/restkit/resource.py", line 122, in head
params_dict=params_dict, **params)
File "/Library/Python/2.6/site-packages/couchapp/client.py", line 143, in request
raise RequestFailed("unknown error [%s]" % str(e))
RequestFailed: unknown error [[Errno 22] Invalid argument]
I'm on OS X 10.6.8, CouchDB is already setup with admins, and the .couchapprc file has the default db set as http://user:pass#localhost:5984/mydb. I've followed the instructions from couchapp.org for a Homebrew install. The only thing I can figure is that this is a Python-related problem, but I don't know Python and can't seem to figure out why this thing is failing. Any help tracking down this problem and fixing it would be much appreciated.
Thanks.
When this happens to me it usually means SOMEWHERE....SOMEHOW, some JSON in the _doc folder is formatted badly, and it could be on a weird level. So like two _ids or a _rev where it shouldn't be.
I get the same problem and solved it, by downgrade to other version.
https://github.com/downloads/couchapp/couchapp/couchapp-0.8.1-macosx.zip
Seems the best solution, for now.
Related
Hi I have managed to install Ceph Octopus 15.2.4 and python Python 3.6.8 on CentOS Linux release 8.2.2004.
Cluster health is Good. However, when I try configure the zabbix module using steps in this
https://docs.ceph.com/en/latest/mgr/zabbix/
I get
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1167, in _handle_command
return self.handle_command(inbuf, cmd)
File "/usr/share/ceph/mgr/zabbix/module.py", line 407, in handle_command
return 0, json.dumps(self.config, index=4, sort_keys=True), ''
File "/lib64/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
TypeError: __init__() got an unexpected keyword argument 'index'
I checked the template and it looks to be latest.
Not sure what seems to be the issue here.
Regards,
j
This problem is typo bug.
https://github.com/ceph/ceph/commit/0e9303d0599c92e575aae7acca87328ed8ee9527
This one has a bad typo in it! It should be "indent=4", not "index=4"!
But, this problem is not fixed in 15.2.5.
So I found this project
https://codereview.stackexchange.com/questions/192281/download-song-or-video-from-youtube-using-pytube
online and it allows you to dowload youtube videos from online but when I enter the link and click download it gives me this error and I have no idea what it means and I have tried to search google for the answer but I can't find any solutions so I hope that someone could help me.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\tkinter\
__init__.py", line 1705, in __call__
return self.func(*args)
File "C:\Users\bob\Desktop\youtube.py", line 104, in checkYoutubeLink
self.downloadWindow()
File "C:\Users\bob\Desktop\youtube.py", line 112, in downloadWindow
self.app = SecondPage(self.newWindow, self.youtubeEntryVar.get(), self.Folde
rName, self.ChoicesVar.get())
File "C:\Users\bob\Desktop\youtube.py", line 134, in __init__
self.yt = YouTube(self.youtubeEntry)
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\site-pac
kages\pytube\__main__.py", line 88, in __init__
self.prefetch_init()
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\site-pac
kages\pytube\__main__.py", line 96, in prefetch_init
self.prefetch()
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\site-pac
kages\pytube\__main__.py", line 170, in prefetch
age_restricted=self.age_restricted,
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\site-pac
kages\pytube\extract.py", line 121, in video_info_url
group=0,
File "C:\Users\bob\AppData\Local\Programs\Python\Python37\lib\site-pac
kages\pytube\helpers.py", line 65, in regex_search
.format(pattern=pattern),
pytube.exceptions.RegexMatchError: regex pattern (\W[\'"]?t[\'"]?: ?[\'"](.+?)[\
'"]) had zero matches
Since this error was coming from pytube, I did a quick search of their issues in github. This is the issue for the problem:
https://github.com/nficano/pytube/issues/381
It says it is fixed in version 9.5.0, pip install -U pytube should install the fixed version.
traceback is the sequence of unreturned-from calls made up until the point where the actual error occurred. It helps you identify not only the specific error, but the context in which it occurred.
I've been migrating some Python 2.7.11 code to 3.5.1 after running into trouble with unicode. This was the last straw - since I started using the venv module there's no reason to be on 2.7 just because someone doesn't like 3!
The problem occurs while trying to run a one-way sync (ie. downloading changes only).
Here is the full error message, paths shortened:
Traceback (most recent call last):
File "%SCRIPT%.py", line 209, in <module>
updated_schedules = dbx_sync.One_Way_Sync(config['Dropbox Parameters']['Directory'], config['Dropbox Parameters']['Base Path'])
File "%COMMON_PATH%\modules\dropbox_sync_schedules.py", line 62, in One_Way_Sync
result = client.delta(cursor, base_path)
File "%COMMON_PATH%\env-home\lib\site-packages\dropbox\client.py", line 569, in delta
return self.rest_client.POST(url, params, headers)
File "%COMMON_PATH%\env-home\lib\site-packages\dropbox\rest.py", line 322, in POST
return cls.IMPL.POST(*n, **kw)
File "%COMMON_PATH%\env-home\lib\site-packages\dropbox\rest.py", line 260, in POST
is_json_request=is_json_request)
File "%COMMON_PATH%\env-home\lib\site-packages\dropbox\rest.py", line 235, in request
raise ErrorResponse(r, r.read())
dropbox.rest.ErrorResponse: [400] 'Invalid "cursor" parameter: u"b\'\'"'
Searching for "invalid cursor parameter" wasn't any help, so I thought I'd come here.
u"b\'\'" is the key here. I just couldn't understand how that representation had ended up being sent as a string.
The issue was in reading the old cursor from a file (which for this example is empty): in Python 2 I had opened the file in mode rb - in Python 3 just r is all that's required, and everything works.
Hurrah!
I am starting with Microsoft Azure SDK for Python (https://github.com/Azure/azure-sdk-for-python), but I have problems.
I am using Scientific Linux and I have installed the SDK for Python 3.4 following the next steps:
(instead of the SDK directory)
python setup.py install
after that I created a simple script just to test the connection:
from azure.storage import BlobService
blob_service = BlobService(account_name='thename', account_key='Mxxxxxxx3w==' )
blob_service.create_container('testcontainer')
for i in blob_service.list_containers():
print(i.name)
following this documentation:
http://blogs.msdn.com/b/tconte/archive/2013/04/17/how-to-interact-with-windows-azure-blob-storage-from-linux-using-python.aspx
http://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#large-blobs
but is not working, I always receive the same error:
python3 test.py
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/storageclient.py", line 143, in _perform_request
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/storageclient.py", line 132, in _perform_request_worker
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/http/httpclient.py", line 247, in perform_request
azure.http.HTTPError: The value for one of the HTTP headers is not in the correct format.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 21, in <module>
blob_service.create_container('testcontainer')
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/blobservice.py", line 192, in create_container
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/__init__.py", line 905, in _dont_fail_on_exist
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/blobservice.py", line 189, in create_container
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/storageclient.py", line 150, in _perform_request
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/storage/__init__.py", line 889, in _storage_error_handler
File "/usr/local/lib/python3.4/site-packages/azure-0.9.0-py3.4.egg/azure/__init__.py", line 929, in _general_error_handler
azure.WindowsAzureError: Unknown error (The value for one of the HTTP headers is not in the correct format.)
<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:b37c5584-0001-002b-24b8-c2c245000000
Time:2014-11-19T14:54:38.9378626Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2012-02-12</HeaderValue></Error>
Thanks in advance and best regards.
I have this exact same issue. I believe it's a library bug, but the author/s haven't had their say yet.
It looks like the response states the version, but it's actually giving you the header that's wrong. Its value should be "2014-02-14", you can do the fix shown in https://github.com/Azure/azure-sdk-for-python/pull/289 .
Hopefully this will be fixed and nobody will ever read this answer. Cheers!
I've been learning to use python in astronomy and for that I'm following this notes. In the very beginning the author does the following example:
>>> im = pyfits.getdata('http://das.sdss.org/www/cgi-bin/drC?RUN=3630&RERUN=40&CAMCOL=3&FIELD=83&FILTER=r')
>>> numdisplay.display(im,z1=1000,z2=1500)
I try to replicate it and I get:
>>> numdisplay.display(im,z1=1000,z2=1500)
Image displayed with Z1: 1000 Z2: 1500
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
numdisplay.display(im,z1=1000,z2=1500)
File "C:\Mine\Python\lib\site-packages\numdisplay\__init__.py", line 446, in display
_d.writeImage(bpix,_wcsinfo)
File "C:\Mine\Python\lib\site-packages\numdisplay\displaydev.py", line 513, in writeImage
self.writeData(_lx,_ydisp,_fpix[block,:])
File "C:\Mine\Python\lib\site-packages\numdisplay\displaydev.py", line 379, in writeData
self._writeHeader(opcode,self._MEMORY, -nbytes, x, y, frame, 0)
File "C:\Mine\Python\lib\site-packages\numdisplay\displaydev.py", line 542, in _writeHeader
self._write(a.tostring())
File "C:\Mine\Python\lib\site-packages\numdisplay\displaydev.py", line 580, in _write
nwritten = self._socket.send(s[-n:])
error: [Errno 10054] An existing connection was forced to close by the remote host
I don't understand what I'm doing wrong. I mean if I write numdisplay.open() everything is fine... I'm thinking that it might be my antivirus or something that doesn't let python to communicate with ds9... Can somebody help me?
Edit: Well it doesn't seem to be the antivirus. I stopped it and run the script and I got the same error.
I was getting similar error messages, and I just tried adding a non-'None' argument to the bufname argument and it works (my image is about 4096.4096):
numdisplay.display(data,bufname='imt4096')