Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import assets CSV (Via web gui or command line) #2619

Closed
2 tasks done
TheGreatGene opened this issue Sep 16, 2016 · 13 comments
Closed
2 tasks done

Unable to import assets CSV (Via web gui or command line) #2619

TheGreatGene opened this issue Sep 16, 2016 · 13 comments

Comments

@TheGreatGene
Copy link

Error when importing via web gui: Whoops, looks like something went wrong

Error when importing from the command line: [Symfony\Componet\Debug\Exception\FatalThrowableError] Call to undefined function ForceUTF8\utf8_decode()

Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

- Version of Snipe-IT you're running: v3.4.0-9-g67315d8
- What OS and web server you're running Snipe-IT on: Ubuntu 16.04.1 LTS
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc): install.sh
- If you're getting an error in your browser, include that error:
FatalThrowableError in Encoding.php line 339:
Call to undefined function ForceUTF8\utf8_decode()
Full error attached below
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error?: CSV Import

- Any errors that appear in your browser's error console. See attachement
- Confirm whether the error is reproduceable on the demo. Import is not supported via the demo
- Include any additional information you can find in app/storage/logs and your webserver's logs. Attached below
- Include what you've done so far in the installation, and if you got any error messages along the way. Created asset models, accessories, and custom statues. Imported users via CSV
- Indicate whether or not you've manually edited any data directly in the database I have not

@pavan137049
Copy link

pavan137049 commented Sep 16, 2016

I think the file you are trying to import might be unicode.txt format . Make sure the file which you are importing in saved as CSV file before importing . Even I faced the similar issue .

@TheGreatGene
Copy link
Author

TheGreatGene commented Sep 16, 2016

The file I'm using is a CSV. I used this site(http://csvlint.io/) to validate my CSV after the import didn't work.

Edit:
I've even tried to import the snipe-sample-assets.csv from here https://snipe-it-manual.readme.io/docs/importing-assets and I get the same error.

@dmeltzer
Copy link
Contributor

You need to rerun composer install --no-dev --prefer-source after ever snipe-it update, you are missing a dependency.

@TheGreatGene
Copy link
Author

Reran composer install, rebooted, still getting the same error.

@snipe
Copy link
Owner

snipe commented Sep 16, 2016

@TheGreatGene in your composer.json, do you see:

"neitanod/forceutf8": "dev-master"

?

@TheGreatGene
Copy link
Author

Yes. Line 26

@snipe
Copy link
Owner

snipe commented Sep 16, 2016

In your vendor directory, do you see a directory called neitanod?

@TheGreatGene
Copy link
Author

Yes.

@dmeltzer
Copy link
Contributor

Does a composer dump-autoload do anything for you?

@TheGreatGene
Copy link
Author

@dmeltzer

No still getting the same result.

@TheGreatGene
Copy link
Author

Reinstalled on Ubuntu 14.04 instead of 16.04 and import works fine.

@dmeltzer
Copy link
Contributor

For future reference: It appears it's a php7/16.04 issue. You need to install php-xml (And the install script should depend on it).

@sydit
Copy link

sydit commented Mar 29, 2017

Run sudo apt-get install php7.0-xml
Restart php-fpm and webserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants