将csv导入到sqlite(firefox add-on)+ TypeError:gFile.contents为null [英] importing csv to sqlite(firefox add-on) +TypeError: gFile.contents is null
问题描述
我正在尝试将.csv文件导入到sqlite数据库(firefox插件)。
I'm trying to import a .csv file into sqlite database (firefox add-on).
它有大约26,000行,4列。每次出现此错误:
It has approximately 26,000 rows with 4 columns. Each time it gives this error:
CSV Worker错误! TypeError:gFile.contents is null文件名:chrome://sqlitemanager/content/workerCsv.js行号:52
CSV Worker error! TypeError: gFile.contents is null File name: chrome://sqlitemanager/content/workerCsv.js Line number: 52
尝试通过拆分csv文件。
I already tried by splitting the csv file as well.
推荐答案
新的Firefox 35版本更正了错误 716491 ,这导致sqlite管理器插件的这个问题。在插件中似乎有两个地方,其中一些响应代码被测试。一个解决方案是替换这两行。插件路径 chrome://sqlitemanager/content/workerCsv.js
指向其中一个文件。作为插件的用户,您可以在您的插件版本中如下修复:
The new Firefox 35 version corrected the bug 716491, which lead to this problem with the sqlite-manager addon. There seem to be two places in the addon, where some response code is tested. A solution is to replace these two lines. The addon path chrome://sqlitemanager/content/workerCsv.js
is refering to one of this files. As a user of the addon, you can fix that in your version of the plugin as follows:
- 转到您的Firefox配置文件文件夹和
扩展
- 重命名文件
SQLiteManager@mrinalkant.blogspot.com.xpi
intoSQLiteManager@mrinalkant.blogspot.com.zip
- 将此zip文件的内容解压缩到子文件夹
文件夹中的
,并删除zip文件 - 打开 c $
。 $ $
c $ c> if(req.status == 0){
withif(req.status == 0 || req.status == 200){
on line 20 - 保存
- 对第15行的testCsv.js执行相同操作
- 重新启动Firefox
- Go to your Firefox profile folder and the subfolder
extensions
- Rename the file
SQLiteManager@mrinalkant.blogspot.com.xpi
intoSQLiteManager@mrinalkant.blogspot.com.zip
- Extract the content of this zip file into a subfolder
SQLiteManager@mrinalkant.blogspot.com
within theextension
folder and delete the zip file - Open the file
./SQLiteManager@mrinalkant.blogspot.com/chrome/content/workerCsv.js
with a reasonable text editor - Replace
if(req.status == 0) {
withif(req.status == 0 || req.status == 200) {
on line 20 - Save it
- Do the same with testCsv.js on line 15
- Restart Firefox
这对我有用。我想有不同的方法手动再次手动创建插件。但是,我希望这将在正式版本中修复。
This worked for me. I guess there are different ways to create the addon manually again. However, I hope this will be fixed in the official version.
这篇关于将csv导入到sqlite(firefox add-on)+ TypeError:gFile.contents为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!