I attempted to execute gdal_array.SaveArray, while the error prompted as follows:
Traceback (most recent call last):
File "D:/Python34/Mycase/gdalarray_use.py", line 5, in
gdal_array.SaveArray(band1,"D:/PyGDAL_Case/dem_cjz.tif",format="GTiff")
File "D:\Python34\lib\site-packages\osgeo\gdal_array.py", line 240, in SaveArray
return driver.CreateCopy( filename, OpenArray(src_array,prototype) )
File "D:\Python34\lib\site-packages\osgeo\gdal.py", line 1478, in CreateCopy
return _gdal.Driver_CreateCopy(self, *args, **kwargs)
ValueError: Received a NULL pointer.
The issue seems to be related to _gdal.Driver_CreateCopy,right? And I don't konw what is the meaning of "Received a Null pointer".
What measures should I take to tackle this problem?
Related
I am trying to run a Python program that generates visuals from an audio file. I'm a bit of a beginner here, so I've just been reverse-engineering issues and incompatibilities that have come up along the way.
Now, I am faced with an error. The program runs successfully but when it attempts to write/save the output video file, it gives me multiple tracebacks and a a 'TypeError' at the very end:
Traceback (most recent call last):
File "visualize.py", line 400, in <module>
clip.write_videofile(outname,audio_codec='aac')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 307, in write_videofile
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 216, in ffmpeg_write_video
ffmpeg_params=ffmpeg_params) as writer:
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 88, in __init__
'-r', '%0.02f' % fps,
TypeError: must be real number, not NoneType
My understanding is that each of the listed files and lines within them are giving the same error? Or does the TypeError at the end only apply to the most recent (lowest) file reference?
Would love to figure out how to resolve this. Somewhere in these file(s) a number is being referenced incorrectly, it seems.
Thanks so much for any help!!
I tried diving into the most recent (lowest) file called 'ffmpegwriter.py' and I went to the referenced line. To me, '%.02f' looked like it might have been formatted incorrectly, so I tried adding a 0 before the decimal, but same error.
Not sure where to look...
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/14.0/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/home/odoo/src/odoo/14.0/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/14.0/odoo/tools/lru.py", line 34, in getitem
a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f5794273a60>, 'account.account_invoices_without_payment')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 2121, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 2056, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/home/odoo/src/odoo/14.0/addons/account/models/ir_actions_report.py", line 41, in _render_qweb_pdf
invoice_reports = (self.env.ref('account.account_invoices_without_payment'), self.env.ref('account.account_invoices'))
File "/home/odoo/src/odoo/14.0/odoo/api.py", line 511, in ref
return self['ir.model.data'].xmlid_to_object(xml_id, raise_if_not_found=raise_if_not_found)
File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1944, in xmlid_to_object
t = self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)
File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1928, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "", line 2, in xmlid_lookup
File "/home/odoo/src/odoo/14.0/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1921, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system:
account.account_invoices_without_payment
The error occurs when I tried to print an invoice. It happens even if I choose an empty print template. Any help?Thanks.
In my opinion, you should be check table ir_model_data with name=account.account_invoices_without_payment. If you can find, you must update module account. If you can't find, you can be insert new record table ir_model_data with name and res_id = id view account_invoices_without_payment in ir_ui_view.
May be help you.
Please upgrade the module account and make sure that the db using correctly. You can give db-filter to choose the db correctly
After checking in the settings-> external id. I find that somehow this external id got deleted for unknown reason. I opened an new database and compared and find that this is the case then I create a new eternal id according to the new db's value.
An attempt to create invoices in bulk fails with the error as below :
Integrity error:-
The operation can not be completed, probably due to following you may be trying to delete a record while other records still reference it.
-creation/updation :a mandatory field is not set
object with reference :Sales order -sale.order
What am I missing?
4-24 05:41:32,637 4190 ERROR odoo_production_6 openerp.addons.base.ir.ir_cron: Call of self.pool.get('product.from_button').price_import_file(cr, uid, *()) failed in Job 29
Traceback (most recent call last):
File "/mnt/odoo/openerp/addons/base/ir/ir_cron.py", line 138, in _callback
getattr(model, method_name)(cr, uid, *args)
File "/mnt/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
TypeError: price_import_file() takes at least 4 arguments (3 given)
2015-04-24 05:41:52,947 4190 ERROR odoo_production_6 openerp.sql_db: bad query: INSERT INTO "account_move" ("id", "name", "company_id", "journal_id", "state", "period_id", "narration", "date", "ref", "to_check", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('account_move_id_seq'), '/', 1, 2, 'draft', 5, '', '2015-04-19', 'SO99761', false, 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Traceback (most recent call last):
File "/mnt/odoo/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
TransactionRollbackError: could not serialize access due to concurrent update
CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."res_users" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
2015-04-24 05:41:52,948 4190 ERROR odoo_production_6 openerp.addons.base.ir.ir_cron: Call of self.pool.get('warehouse.picklist').create_invoices(cr, uid, *(['R105743853', 'R113227005', 'R146600137', 'R188375618', 'R220118225', 'R351012872', 'R420506806', 'R421507556', 'R426354681', 'R434108532', 'R441768276', 'R502478873', 'R571730346', 'R605517828', 'R630802333', 'R635404642', 'R654263524', 'R664533651', 'R685142753', 'R724478234', 'R761380645', 'R775785828', 'R776745047', 'R786383714', 'R820154123', 'R825637222', 'R826210504', 'R857286181', 'R858340517', 'R868485853'],)) failed in Job 31
Traceback (most recent call last):
File "/mnt/odoo/openerp/addons/base/ir/ir_cron.py", line 138, in _callback
getattr(model, method_name)(cr, uid, *args)
File "/mnt/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/mnt/odoo/voylla_modules/outbound/outbound.py", line 215, in create_invoices
invoice_confirm_obj.invoice_confirm_1(cr, uid, invoice_ids, context)
File "/mnt/odoo/openerp/api.py", line 237, in wrapper
Please check your code, you probably made some field required on sale.order or account.invoice. And you should have overridden the method for creating invoice.
I been with the following error for the past few days and I can't get a clue how to proceed.
The full error is:
2015-01-26 17:29:25,162 21218 ERROR myodoo openerp.service.report: Exception: Unknown report type: webkit
Traceback (most recent call last):
File "/opt/odoo/openerp/service/report.py", line 93, in go
result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
File "/opt/odoo/openerp/report/__init__.py", line 40, in render_report
return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
File "/opt/odoo/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/ir/ir_actions.py", line 155, in render_report
return new_report.create(cr, uid, res_ids, data, context)
File "/opt/odoo/openerp/report/report_sxw.py", line 391, in create
raise NotImplementedError(_('Unknown report type: %s') % report_type)
NotImplementedError: Unknown report type: webkit
2015-01-26 17:29:25,397 21218 ERROR myodoo openerp.addons.web.controllers.main: An exception occured during an http request
Traceback (most recent call last):
File "/opt/odoo/addons/web/controllers/main.py", line 69, in wrap
return f(*args, **kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 1576, in index
request.session.db, request.session.uid, request.session.password, report_id)
File "/opt/odoo/openerp/http.py", line 807, in proxy_method
result = dispatch_rpc(self.service_name, method, args)
File "/opt/odoo/openerp/http.py", line 100, in dispatch_rpc
result = dispatch(method, params)
File "/opt/odoo/openerp/service/report.py", line 34, in dispatch
res = fn(db, uid, *params)
File "/opt/odoo/openerp/service/report.py", line 141, in exp_report_get
return _check_report(report_id)
File "/opt/odoo/openerp/service/report.py", line 119, in _check_report
raise openerp.osv.orm.except_orm(exc.message, exc.traceback)
except_orm: (u'Unknown report type: webkit', (<type 'exceptions.NotImplementedError'>, NotImplementedError(u'Unknown report type: webkit',), <traceback object at 0x7fa2f9af8dd0>))
I been developing on my module so I thought it was something I touched, but even when I install previous working versions of the module I still get the same error.
That makes me feel that there might be a change in the system but I checked if wkhtmltopdf is working and everything seems normal.
Any clue on where to look will be really appreciated.
Thanks!
It can be that you don't have the Webkit report engine installed.
Check if the report_webkit module is installed.
I am trying to get familiar with the feedparser library, but I don't seem to be able to access the content attribute of entries in the feedparser object:
d = feedparser.parse('http://www.reddit.com/r/python/.rss')
post = d.entries[2]
post.content
the above code block gives me this error:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\feedparser.py", line 414, in __getattr__
return self.__getitem__(key)
File "C:\Python34\lib\site-packages\feedparser.py", line 375, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'content'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#87>", line 1, in <module>
content = post.content[0].value
File "C:\Python34\lib\site-packages\feedparser.py", line 416, in __getattr__
raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'content'
Just do a print(post) and you will probably see that it doesn't have a content attribute.
RSS feeds do not guarantee that it will have one.