GnuCash
Contact   Instructions
Bug 797570 - Unable to import vendors
Summary: Unable to import vendors
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - CSV (show other bugs)
Version: 3.8
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
: 797096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-12 12:11 EST by Avi Markovitz
Modified: 2020-02-20 04:05 EST (History)
6 users (show)

See Also:


Attachments
Import vendors ignore screen (145.11 KB, image/png)
2020-01-12 12:11 EST, Avi Markovitz
no flags Details
The vendor file to be imported (4.50 KB, text/csv)
2020-01-12 12:12 EST, Avi Markovitz
no flags Details
debug mode (710 bytes, text/plain)
2020-01-19 04:12 EST, Avi Markovitz
no flags Details
Dialog for not imported rows after the fix. (510.31 KB, image/jpeg)
2020-01-30 12:23 EST, Rob Laan
no flags Details
import result screen (145.01 KB, image/png)
2020-02-16 12:36 EST, Avi Markovitz
no flags Details
Tested import of vendors again (231.94 KB, image/jpeg)
2020-02-17 14:39 EST, Rob Laan
no flags Details
dialog-customer-import-gui.c (97.04 KB, image/png)
2020-02-18 11:38 EST, Avi Markovitz
no flags Details
fixed - vendor/costumer import results screen (254.51 KB, image/png)
2020-02-20 02:32 EST, Avi Markovitz
no flags Details

Description Avi Markovitz 2020-01-12 12:11:24 EST
Created attachment 373526 [details]
Import vendors ignore screen

For year-end cut and balance carry over, I decided to create a new set of books rather than continuing using the 2019 books.

Importing the COA and accounts went smoothly, however vendors and customers a quite a different deal and no matter what I'm doing, it is not happening.
Naturally, there are Hebrew characters in the .csv file (I'm not sure if this is what prevents the import, although I can import the file with OpenOffice.)

A secondary minor issue is the Import summery screen as shone in the attached screen shot.
Comment 1 Avi Markovitz 2020-01-12 12:12:50 EST
Created attachment 373527 [details]
The vendor file to be imported
Comment 2 Avi Markovitz 2020-01-12 12:59:00 EST
...and the shell output:
Gtk-Message: 18:35:47.200: GtkDialog mapped without a transient parent. This is discouraged.

TYPE = VENDOR

(gnucash:29477): Gtk-CRITICAL **: 18:36:16.438: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(gnucash:29477): Gtk-CRITICAL **: 18:36:16.488: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:2: I/O warning : failed to load external entity "/usr/share/gnome/help/gnucash-guide/C/gnc-docbookx.dtd"
<!DOCTYPE book SYSTEM "gnc-docbookx.dtd">
                                         ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:25: parser error : Entity 'app' not defined
  <title><application>&app;</application> Tutorial and Concepts Guide</title>
                           ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:26: parser error : Entity 'manrevision' not defined
  <edition>V&manrevision;</edition>
                         ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:30: parser error : Entity 'app' not defined
   <holder>&app; Documentation Team</holder>
                ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:78: parser error : Entity 'app' not defined
       <publishername>The &app; Documentation Team</publishername>
                               ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:93: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v3.3</revnumber>
                        ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:97: parser error : Entity 'app' not defined
          <para role="publisher">&app; Documentation Team</para>
                                      ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:101: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v3.2</revnumber>
                        ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:105: parser error : Entity 'app' not defined
          <para role="publisher">&app; Documentation Team</para>
                                      ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:109: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v3.1</revnumber>
                        ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:113: parser error : Entity 'app' not defined
          <para role="publisher">&app; Documentation Team</para>
                                      ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:117: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v3.0</revnumber>
                        ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:121: parser error : Entity 'app' not defined
          <para role="publisher">&app; Documentation Team</para>
                                      ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:125: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v2.6.20</revnumber>
                        ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:129: parser error : Entity 'app' not defined
          <para role="publisher">&app; Documentation Team</para>
                                      ^
/usr/share/gnome/help/gnucash-guide/C/gnucash-guide.xml:133: parser error : Entity 'app' not defined
        <revnumber>&app; Tutorial and Concepts Guide v2.6.19</revnumber>
Comment 3 Avi Markovitz 2020-01-19 04:12:38 EST
Created attachment 373541 [details]
debug mode
Comment 4 Rob Laan 2020-01-28 06:03:37 EST
The lines in your import file have 10 field separators (semicolons); there should be 18 field seperators in each line.

E.g.

2201;All Star Company;All Star Company;Union Avenue 776;San Juan;CA;;0482938838;;contact@allstar.com;Last contacted on 4/4/2018.;All Star Company; John Alderman, Office 456;Union Avenue 777;San Juan;CA;78998766;;alderman@allstar.com

These are the field names, comma separated this time:

id, company, name, addr1, addr2, addr3, addr4, phone, fax, email, notes, shipname, shipaddr1, shipaddr2, shipaddr3, shipaddr4, shiphone, shipfax, shipmail

I added 8 semicolons to one of the lines from your file, and imported the vendor without a problem (on MacOS).
Comment 5 Avi Markovitz 2020-01-28 08:36:52 EST
Thanks Rob, yes that was it, my actual import file was missing a comma. (i did try comma and semicolons but looks like I felt counting till 18 ;(  )

Pleas also look at this too "A secondary minor issue is the Import summery screen as shone in the attached screen shot." It is very narrow and  will not increase, which makes the output of the screen impossible to read.
Comment 6 Rob Laan 2020-01-30 12:22:15 EST
I have found the cause of that issue with the import summary screen, and will propose a fix for it (which hopefully will make it to the next release). 

For documentation purposes:
In the import of Customers/Vendors and Bills/Invoice, the dialog that lists the not imported rows shows a scrollable view of just 4 rows. The view does not use the available space of the window, and does not expand with window resizing.
The dialog for a user defined regular expression has a similar issue.

To reproduce the bug, import a file of 20 rows of customer data with at least one delimiter missing. The rows will not be matched; after attempted import, a dialog that lists the not imported rows shows a scrollable view of just 4 of the rows. The view does not use the available space of the window, but stays at just 4 rows high.

See attachment of the original reporter for the dialog before the fix.
See second attachment for the dialog after the fix.
Comment 7 Rob Laan 2020-01-30 12:23:04 EST
Created attachment 373569 [details]
Dialog for not imported rows after the fix.
Comment 8 Avi Markovitz 2020-01-30 12:37:19 EST
Perfect!
Comment 9 John Ralls 2020-01-30 13:22:14 EST
Avi,

It's not fixed until the patch is approved and committed to the repository.

Did you even build GnuCash with the patch and test it?
Comment 10 John Ralls 2020-01-30 13:25:33 EST
The proposed fix is https://github.com/Gnucash/gnucash/pull/640.
Comment 11 Avi Markovitz 2020-01-31 01:37:15 EST
No, I did pull and build 'maint' yesterday and assumed it did not go through yet. ( I do not know how to pull a specific patch, what can i say, I'm just a layman user)
Comment 12 John Ralls 2020-01-31 11:45:26 EST
Oh, that's easy. Make a branch and pull the proposed branch into it. The URL is right under the title of the PR, but it's not quite pull-able. The URL for PR 640 is https://github.com/ekinonnakapito/gnucash/tree/bug_797570; to make it pullable you need the base URI and the branch, so just change '/tree/' into a space: 

  git checkout -b pull-640
  git pull https://github.com/ekinonnakapito/gnucash bug_797570
Comment 13 Bob 2020-02-13 09:54:54 EST
*** Bug 797096 has been marked as a duplicate of this bug. ***
Comment 14 Avi Markovitz 2020-02-14 08:08:07 EST
Unfortunately I was not able to build or run from the above mentioned branch. for some reason make ends with errors...
Comment 15 John Ralls 2020-02-14 12:39:25 EST
Hmm, it just built cleanly for me. What were the errors and what distro and version are you using?
Comment 16 Avi Markovitz 2020-02-15 07:12:34 EST
'cmake' ended successfully, but 'make' got stuck at 88%, dumping a bunch of messages about reports and scm (i cant find the screen shot i took :( ...)
I did start several times all over from clean including complete removal of gnucash, but ended  with the same result. 
'ninja' however did work but now i do not see any report if logged in with HEB environment. looks like it works just fine in ENGLISH though.

Version: 3.8
Build ID: git 3.8b-149-gb23d2445f+(2020-02-13)
Finance::Quote: 1.49
Comment 17 John Ralls 2020-02-15 12:03:06 EST
Interesting. There's a possible conflation with a problem created by f66b7ed from Thursday, which causes reports to not render except when they're left open when quitting GnuCash: They do render when GnuCash starts up again.

You can see if you got f66b7ed in your build with `git log --oneline -10` and if it's there please revert it with `git revert f66n7ed` and build again (no need to rerun cmake, just rerun ninja after reverting).
Comment 18 Avi Markovitz 2020-02-15 12:55:29 EST
I don't think I Have it...  

"avi@avi-PC-Mint19:~/git/gnucash$ git log --oneline -10
b23d2445f (HEAD -> maint, origin/maint, origin/HEAD) New budgets save state information with no changes
7577afe0a Bug 796911 - Minimum window width to large.
f66b7ed27 Follow up to previous commit 94cb965
58ddb47f5 [new-owner-report] change highlight trigger: onclick to onmousedown
3be42bebb [test-new-owner-report] refine test to target exact table row
18acb4234 [new-owner-report] clarify payment-txn processor
09d3e9537 [new-owner-report] if Payment amount is negative, label "Refund"
6e64a3783 [new-owner-report] fix comment for non-document accumulator
19db1daed Bug 797419 - equity-statement unrealized-gain calculator uses weighted-average
7cbe367ca [new-owner-report] LHS invoice->payment LINK/PAYMENT merge
avi@avi-PC-Mint19:~/git/gnucash$"

But still reports are not rendering logged in with Hebrew language even if they are left open on exit.
Comment 19 John Ralls 2020-02-15 13:03:03 EST
Yes you do:
    b23d2445f (HEAD -> maint, origin/maint, origin/HEAD) New budgets save state information with no changes
    7577afe0a Bug 796911 - Minimum window width to large.
 -->f66b7ed27 Follow up to previous commit 94cb965
    58ddb47f5 [new-owner-report] change highlight trigger: onclick to onmousedown
    3be42bebb [test-new-owner-report] refine test to target exact table row
    18acb4234 [new-owner-report] clarify payment-txn processor
    ...
Comment 20 Avi Markovitz 2020-02-16 02:42:54 EST
All back to normal again, thanks a lot for your help John!
I did not realize thatf66b7ed and f66b7ed27 ware the same, my bad...
Comment 21 John Ralls 2020-02-16 12:09:11 EST
The actual hash is f66b7ed275eba56bd8fee1fee9f9e3457351cacb. It's generated by a crypto algorithm called SHA-1 that produces sufficiently random values that the first half-dozen or so characters are enough to uniquely identify it within a particular chain of commits.

With that resolved, does Rob's PR fix the import summary screen width?
Comment 22 Avi Markovitz 2020-02-16 12:36:30 EST
Created attachment 373580 [details]
import result screen
Comment 23 Avi Markovitz 2020-02-16 12:39:38 EST
Thanks for the explanation John.
No, unfortunately not. see attachment...
Comment 24 Rob Laan 2020-02-17 14:38:43 EST
I retested this, for both vendors/customers and bills/invoices import. And again found that in my installation (on MacOS High Sierra), the fix solves the issue. See attached screenshot.

Not sure why you have a different result, Avi. Can you verify that your build includes the pull request? E.g. that line 446 of file gnucash/import-export/customer-import/dialog-customer-import-gui.c reads 

gtk_box_pack_start(GTK_BOX(content_area), scrolledwindow, TRUE, TRUE, 0);

and not 

gtk_container_add (GTK_CONTAINER (content_area), scrolledwindow);
Comment 25 Rob Laan 2020-02-17 14:39:30 EST
Created attachment 373581 [details]
Tested import of vendors again
Comment 26 Avi Markovitz 2020-02-18 11:38:19 EST
Created attachment 373582 [details]
dialog-customer-import-gui.c
Comment 27 Avi Markovitz 2020-02-18 11:39:24 EST
Neither, it reads: 
gtk_container_add (GTK_CONTAINER (content_area), scrolledwindow);

see the attachment
Comment 28 John Ralls 2020-02-18 13:42:48 EST
Umm, that's exactly what Rob's "and not" version is. You haven't managed to apply the PR.
Comment 29 Rob Laan 2020-02-19 15:34:58 EST
Avi,

the pull request has been pulled into maint, so if you build the current maint, you can test the fix with that.

Rob
Comment 30 Avi Markovitz 2020-02-20 02:32:57 EST
Created attachment 373584 [details]
fixed - vendor/costumer import results screen
Comment 31 Avi Markovitz 2020-02-20 02:33:57 EST
Thanks Rob, looks good
Comment 32 Geert Janssens 2020-02-20 04:05:26 EST
Marking it as fixed then. Thanks!

Note You need to log in before you can comment on or make changes to this bug.