将csv导入到sqlite(firefox add-on)+ TypeError:gFile.contents为null [英] importing csv to sqlite(firefox add-on) +TypeError: gFile.contents is null

查看:169
本文介绍了将csv导入到sqlite(firefox add-on)+ TypeError:gFile.contents为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:


  1. 转到您的Firefox配置文件文件夹和扩展

  2. 重命名文件 SQLiteManager@mrinalkant.blogspot.com.xpi into SQLiteManager@mrinalkant.blogspot.com.zip

  3. 将此zip文件的内容解压缩到子文件夹 文件夹中的,并删除zip文件

  4. 打开 c $ 。 $ $ c $ c> if(req.status == 0){ with if(req.status == 0 || req.status == 200){ on line 20

  5. 保存

  6. 对第15行的testCsv.js执行相同操作

  7. 重新启动Firefox

  1. Go to your Firefox profile folder and the subfolder extensions
  2. Rename the file SQLiteManager@mrinalkant.blogspot.com.xpi into SQLiteManager@mrinalkant.blogspot.com.zip
  3. Extract the content of this zip file into a subfolder SQLiteManager@mrinalkant.blogspot.com within the extension folder and delete the zip file
  4. Open the file ./SQLiteManager@mrinalkant.blogspot.com/chrome/content/workerCsv.js with a reasonable text editor
  5. Replace if(req.status == 0) { with if(req.status == 0 || req.status == 200) { on line 20
  6. Save it
  7. Do the same with testCsv.js on line 15
  8. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆