Skip to content

Import Item csv #2744

Closed
Closed

Description

@nathanzky

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • [] Reporting an issue of an unmodified OSPOS installation
  • [] Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • [] Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • [] Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • [] Read the wiki
  • [] Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • [] Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

  • OSPOS version is: 3.3.1 - c786d4
  • OSPOS git commit hash is:
  • PHP version is: 7.0.21
  • MySQL or MariaDB version is: 5.7.18
  • OS and version is: OS: Linux rhel76 3.10.0-957.el7.x86_64
  • WebServer is: Apache2
  • Selected language is: US
  • (If applicable) Docker installation:
  • (If applicable) Installation package for the LAMP/LEMP stack is: LAMP

Issue / Bug / Question / New Feature

Bug

Import Item csv is not working having this error when I click submit button
error_Import_csv

Activity

  1. andriux1990 commented on Mar 2, 2020

    @andriux1990
    Member

    You must be doing something wrong ... because the CSV import works fine. check the columns that everything is in order and that each cell has what it should have, and if they have barcodes, make sure they are not already in the db

  2. daN4cat commented on Mar 2, 2020

    @daN4cat
    Collaborator

    Have you generated the csv with excel or something else?

  3. myosotisgit commented on Mar 2, 2020

    @myosotisgit

    @nathanzky
    I have spend a few hours on the importing of a csv file, generated from a very old version of ospos (v1.x). I finally managed.

    Please note that ospos (current version) can be picky on what is imported! For example,

    • empty rows/columns will not work
    • NULL values will not be imported, for example on the ID column
    • any value in columns like 'allow alt descr' will enable the option. If you dont want the option enabled leave the column empty.
  4. myosotisgit commented on Mar 2, 2020

    @myosotisgit

    Another tip, If you work with 1 or more stock locations use this procedure:

    • First create the stock location(s) (config > Stock)
      In my example i have 1 location called "winkel" so i changed the default value.

    Go to items
    download the csv template

    Add your articles to this csv.
    Upload the csv file.

    I have included an xslc example (with my stock location column) that works

    Copy of import_items.xlsx

  5. daN4cat commented on Mar 3, 2020

    @daN4cat
    Collaborator

    @objecttothis any chance you can improve the import feature to avoid the issues reported above?

  6. daN4cat commented on Mar 3, 2020

    @daN4cat
    Collaborator

    @myosotisgit thanks a lot for all the tips, very good. I'll add to the FAQ this link.

  7. self-assigned this
    on Mar 3, 2020
  8. added this to the 3.3.2 milestone on Mar 3, 2020
  9. objecttothis commented on Mar 3, 2020

    @objecttothis
    Member

    @objecttothis any chance you can improve the import feature to avoid the issues reported above?

    Do you mean these?

    Please note that ospos (current version) can be picky on what is imported! For example,

    empty rows/columns will not work
    NULL values will not be imported, for example on the ID column
    any value in columns like 'allow alt descr' will enable the option. If you dont want the option enabled leave the column empty.

    I need more information on what "empty columns will not work" means. If, by empty columns, it means that if any cell is empty then it kicks an error, then I can change that so that if required cells are empty it will kick an error, but otherwise will process the row without error, but I need clarification.

    I can change the code so that it just skips empty rows without error.

    Generally the reason for the pickiness is that the CSV import has a powerful ability to mess up data, so the more controlled, the better.

    I have plans to implement a feature to give you a csv of which rows failed and the option to import the remaining rows, so that users can get more specific information about what the problem was, as well as quickly fix problems and re-import the remaining. This feature is not at the top of my list right now though.

    The 'allow alt descr' and similar fields are textboxes, so it's by design that non-empty cells result in a checked box. If it isn't already, I could modify the code so that NULL, '', ' ' (any number of spaces), 0 and FALSE all make the box unchecked.

    If there are other things that I'm missing, please let me know. I can work on all, but the detailed report/optional import successful rows now, but I need more details to begin.

  10. myosotisgit commented on Mar 3, 2020

    @myosotisgit

    I need more information on what "empty columns will not work" means. If, by empty columns, it means that if any cell is empty then it kicks an error, then I can change that so that if required cells are empty it will kick an error, but otherwise will process the row without error, but I need clarification.

    Logically speaking, empty columns (not required ones) will throw an error. Makes sense.
    But empty rows should be ignored. But you shouldnt have empty rows on the import file anyway i hope :-)

    Generally the reason for the pickiness is that the CSV import has a powerful ability to mess up data, so the more controlled, the better.

    This is understood and appreciated!

    The 'allow alt descr' and similar fields are textboxes, so it's by design that non-empty cells result in a checked box. If it isn't already, I could modify the code so that NULL, '', ' ' (any number of spaces), 0 and FALSE all make the box unchecked.

    With documentation this could be made clear :-)

    If there are other things that I'm missing, please let me know. I can work on all, but the detailed report/optional import successful rows now, but I need more details to begin.

    Now that you mention it. The error modal (popup) disappears after a few seconds.
    It would be nice if this modal would stay displayed until i click "remove" or X.

  11. daN4cat commented on Mar 3, 2020

    @daN4cat
    Collaborator

    Let's at least ignore empty rows.

  12. daN4cat commented on Mar 3, 2020

    @daN4cat
    Collaborator

    I agree for the unchecked cases.

  13. 14 remaining items

  14. objecttothis commented on Jul 27, 2020

    @objecttothis
    Member

    @myosotisgit We are getting ready to merge #2821, but it would help if you could go to bintray and download the latest build labeled "Item_import_update" and test it out. Tell me if you see any problems: https://bintray.com/jekkos/opensourcepos/opensourcepos/view/files?sort=updated&order=desc#files

  15. myosotisgit commented on Aug 4, 2020

    @myosotisgit

    Sorry for the radio silence. I am dealing with a lot of work and some personal dealings Cannot say when this is over...

  16. objecttothis commented on Aug 4, 2020

    @objecttothis
    Member

    Sorry for the radio silence. I am dealing with a lot of work and some personal dealings Cannot say when this is over...

    Understood. No worries. Sorry for the added stress you're going through.

  17. hanisirfan commented on Sep 16, 2020

    @hanisirfan

    I don't know if this is related or not but I'm also having a problem importing CSV data. The import was successful and the data is indeed in the database but it still say "No Items to display.". I've install all the necessary stuff (PHP extensions etc). Oh btw this is hosted locally using XAMPP.

  18. objecttothis commented on Sep 16, 2020

    @objecttothis
    Member

    @hanisirfan what is the version hash that you are using currently? You should see it in the footer of each page to the right of the version number or under Office -> Configuration -> Setup & Config

  19. hanisirfan commented on Sep 16, 2020

    @hanisirfan

    OSPOS Installation Info: 3.3.2 - bb309c

    It's actually working fine now but before I tried about 2-3 fresh install before. Fresh install means that I delete all the files and drop the database and redo the installation based on the INSTALL.md instruction.

    Out of topic:
    Can we actually see "Receivings" report just like the other reports? Maybe per day report?

    Thanks.

  20. nathanzky commented on Sep 16, 2020

    @nathanzky
    Author

    @hanisirfan I try to do fresh install and drop the database but Im still getting this error in item import. can you send me the steps on how you manage to do it and if you can share your items_csv format would be appreciated.

  21. hanisirfan commented on Sep 16, 2020

    @hanisirfan

    @nathanzky I just follow this instructions.

    (Local Install)
    https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md

    I actually did it couple of times for it to work, I don't know why it doesn't works the first time.

    For the CSV file, I downloaded from the system after I installed it. If you still want it maybe later I can share with you. I believe I'm using the latest stable version isn't it @objecttothis

  22. objecttothis commented on Sep 16, 2020

    @objecttothis
    Member

    OSPOS Installation Info: 3.3.2 - bb309c

    It's actually working fine now but before I tried about 2-3 fresh install before. Fresh install means that I delete all the files and drop the database and redo the installation based on the INSTALL.md instruction.

    Out of topic:
    Can we actually see "Receivings" report just like the other reports? Maybe per day report?

    Thanks.

    That build does not include my changes in the #2821 which have not yet been merged into the master because I'm waiting on code reviews by other contributors. I recommend you download one of those builds from bintray and test that to see if it resolves the issue.

  23. hanisirfan commented on Sep 16, 2020

    @hanisirfan

    For me, after doing couple of reinstall. It actually works and as I said before I don't know what the cause. It's a bit weird because items doesn't show up in the view but actually exist in db. It's become more confusing after it will only show up in view after adding a sale for an item (only that item will be visible in items view but the rest isn't). I'm not an expert, I could help find the cause if I actually are.

  24. objecttothis commented on Sep 16, 2020

    @objecttothis
    Member

    @nathanzky I just follow this instructions.

    (Local Install)
    https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md

    I actually did it couple of times for it to work, I don't know why it doesn't works the first time.

    For the CSV file, I downloaded from the system after I installed it. If you still want it maybe later I can share with you. I believe I'm using the latest stable version isn't it @objecttothis

    @nathanzky the latest stable version does not have my changes and bug fixes from #2821 in it yet.

  25. daN4cat commented on Jan 1, 2021

    @daN4cat
    Collaborator

    Now part of #3029.

  26. linked a pull request that will close this issueImport update rework (#1412) #3029on Jan 1, 2021
  27. objecttothis commented on Jan 1, 2021

    @objecttothis
    Member

    Now part of #3029.

    Yep. Once we get done with bugfix builds for 3.3.x it should be next in line to get merged into the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions