Open balagab opened 10 years ago
Hi @balagab, We have done a fix for this, please use latest code from master and let me know if still issue exists.
Hi, thanks for the feedback, I've overwritten the files but the problem is the same. Please find the log below:
ActionView::Template::Error (invalid byte sequence in UTF-8): 26: <% @csv_rows[0].each_with_index do |value, index| %> 27:
If you need something more, please let me know. Thanks
Hi @balagab
I've tried to replicate this issue with some french accents csv but it gets imported successfully.
Can you provide me few examples of these accents or a sample csv?
Also do let me know your Redmine version.
Hi @stpl Sure, a tried to change the priority value from "Normal" to "Normál". Redmine version is 2.5.0 stable, Ruby version is 1.9.3-p545, Rails version is 3.2.17 and we use MS SQL server. Thanks!
I've tried to import csv after changing priority value from "Normal" to "Normál" but again it imported successfully. Have you restarted your production server after taking latest pull from master?
@stpl Yes, but now I uninstalled the plugin, after installed the new version. First I had to modify the content_type line in csv_import.rb to ":file_name => { :matches => [/csv\Z/], :message => "Oops! Please upload a file with the extension of csv." },". After this the problem is the same, I get internal error when try to import accents value (Normál).
@stpl One more thing, I downloaded the new version from here (Download ZIP): https://github.com/stpl/csv_import_issues Is that correct?
@balagab Yes, you have downloaded correctly. Please provide us the actual error message from log file.
@stpl Here is the log from production.log:
ActionView::Template::Error (invalid byte sequence in UTF-8): 26: <% @csv_rows[0].each_with_index do |value, index| %> 27:
gsub' activesupport (3.2.17) lib/active_support/core_ext/string/output_safety.rb:24:in
html_escape'
activesupport (3.2.17) lib/active_support/core_ext/string/output_safety.rb:135:in concat' actionpack (3.2.17) lib/action_view/buffers.rb:11:in
<<'
plugins/csv_import_issues/app/views/csv_imports/finalize.html.erb:29:in block (2 levels) in _plugins_csv_import_issues_app_views_csv_imports_finalize_html_erb__1353225143902065732_70323017925040' plugins/csv_import_issues/app/views/csv_imports/finalize.html.erb:26:in
each'
plugins/csv_import_issues/app/views/csv_imports/finalize.html.erb:26:in each_with_index' plugins/csv_import_issues/app/views/csv_imports/finalize.html.erb:26:in
block in _plugins_csv_import_issues_app_views_csv_imports_finalize_html_erb1353225143902065732_70323017925040'
actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:40:in block in capture' actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:187:in
with_output_buffer'
haml (4.0.5) lib/haml/helpers/action_view_xss_mods.rb:5:in with_output_buffer_with_haml_xss' actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:40:in
capture'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:52:in capture_with_haml' actionpack (3.2.17) lib/action_view/helpers/form_helper.rb:378:in
form_for'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:139:in form_for_with_haml' haml (4.0.5) lib/haml/helpers/action_view_xss_mods.rb:28:in
form_for_with_haml_xss'
plugins/csv_import_issues/app/views/csv_imports/finalize.html.erb:15:in `_plugins_csv_import_issues_app_views_csv_imports_finalize_html_erb1353225143902065732_70323017925040'
actionpack (3.2.17) lib/action_view/template.rb:145:inblock in render' activesupport (3.2.17) lib/active_support/notifications.rb:125:in
instrument'
actionpack (3.2.17) lib/action_view/template.rb:143:inrender' actionpack (3.2.17) lib/action_view/renderer/template_renderer.rb:47:in
block (2 levels) in render_template'
actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:inblock in instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in
block in instrument'
activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in
instrument'
actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' actionpack (3.2.17) lib/action_view/renderer/template_renderer.rb:46:in
block in render_template'
actionpack (3.2.17) lib/action_view/renderer/template_renderer.rb:54:inrender_with_layout' actionpack (3.2.17) lib/action_view/renderer/template_renderer.rb:45:in
render_template'
render_parent (0.0.5) lib/render_parent/rails3/on_load_action_view.rb:58:inrender_template_with_active_template' actionpack (3.2.17) lib/action_view/renderer/template_renderer.rb:18:in
render'
actionpack (3.2.17) lib/action_view/renderer/renderer.rb:36:inrender_template' actionpack (3.2.17) lib/action_view/renderer/renderer.rb:17:in
render'
actionpack (3.2.17) lib/abstract_controller/rendering.rb:110:in_render_template' actionpack (3.2.17) lib/action_controller/metal/streaming.rb:225:in
_render_template'
actionpack (3.2.17) lib/abstract_controller/rendering.rb:103:inrender_to_body' actionpack (3.2.17) lib/action_controller/metal/renderers.rb:28:in
render_to_body'
actionpack (3.2.17) lib/action_controller/metal/compatibility.rb:50:inrender_to_body' actionpack (3.2.17) lib/abstract_controller/rendering.rb:88:in
render'
actionpack (3.2.17) lib/action_controller/metal/rendering.rb:16:inrender' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:40:in
block (2 levels) in render'
activesupport (3.2.17) lib/active_support/core_ext/benchmark.rb:5:inblock in ms' /opt/bitnami/ruby/lib/ruby/1.9.1/benchmark.rb:295:in
realtime'
activesupport (3.2.17) lib/active_support/core_ext/benchmark.rb:5:inms' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:40:in
block in render'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:83:incleanup_view_runtime' activerecord (3.2.17) lib/active_record/railties/controller_runtime.rb:24:in
cleanup_view_runtime'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:39:inrender' plugins/csv_import_issues/app/controllers/csv_imports_controller.rb:16:in
create'
actionpack (3.2.17) lib/action_controller/metal/implicit_render.rb:4:insend_action' actionpack (3.2.17) lib/abstract_controller/base.rb:167:in
process_action'
actionpack (3.2.17) lib/action_controller/metal/rendering.rb:10:inprocess_action' actionpack (3.2.17) lib/abstract_controller/callbacks.rb:18:in
block in process_action'
activesupport (3.2.17) lib/active_support/callbacks.rb:524:in_run__3483549384554027071__process_action__555887551913359625__callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:405:in
run_callback'
activesupport (3.2.17) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:81:in
run_callbacks'
actionpack (3.2.17) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.17) lib/action_controller/metal/rescue.rb:29:in
process_action'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' activesupport (3.2.17) lib/active_support/notifications.rb:123:in
block in instrument'
activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in
instrument'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:29:inprocess_action' actionpack (3.2.17) lib/action_controller/metal/params_wrapper.rb:207:in
process_action'
activerecord (3.2.17) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.17) lib/abstract_controller/base.rb:121:in
process'
actionpack (3.2.17) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.17) lib/action_controller/metal.rb:203:in
dispatch'
actionpack (3.2.17) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.17) lib/action_controller/metal.rb:246:in
block in action'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:in
dispatch'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:36:incall' journey (1.0.4) lib/journey/router.rb:68:in
block in call'
journey (1.0.4) lib/journey/router.rb:56:ineach' journey (1.0.4) lib/journey/router.rb:56:in
call'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:608:incall' rack-openid (1.3.1) lib/rack/openid.rb:98:in
call'
actionpack (3.2.17) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.5) lib/rack/etag.rb:23:in
call'
rack (1.4.5) lib/rack/conditionalget.rb:35:incall' actionpack (3.2.17) lib/action_dispatch/middleware/head.rb:14:in
call'
actionpack (3.2.17) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.17) lib/action_dispatch/middleware/flash.rb:242:in
call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:incontext' rack (1.4.5) lib/rack/session/abstract/id.rb:205:in
call'
actionpack (3.2.17) lib/action_dispatch/middleware/cookies.rb:341:incall' activerecord (3.2.17) lib/active_record/query_cache.rb:64:in
call'
activerecord (3.2.17) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall' actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:28:in
block in call'
activesupport (3.2.17) lib/active_support/callbacks.rb:405:in_run__807205419014871343__call__2441953962475414946__callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:405:in
run_callback'
activesupport (3.2.17) lib/active_support/callbacks.rb:385:in_run_call_callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:81:in
run_callbacks'
actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (3.2.17) lib/action_dispatch/middleware/remote_ip.rb:31:in
call'
actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall' actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in
call'
railties (3.2.17) lib/rails/rack/logger.rb:32:incall_app' railties (3.2.17) lib/rails/rack/logger.rb:16:in
block in call'
activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:intagged' railties (3.2.17) lib/rails/rack/logger.rb:16:in
call'
actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:incall' rack (1.4.5) lib/rack/methodoverride.rb:21:in
call'
rack (1.4.5) lib/rack/runtime.rb:17:incall' activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in
call'
rack (1.4.5) lib/rack/lock.rb:15:incall' actionpack (3.2.17) lib/action_dispatch/middleware/static.rb:63:in
call'
rack-cache (1.2) lib/rack/cache/context.rb:136:inforward' rack-cache (1.2) lib/rack/cache/context.rb:143:in
pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:ininvalidate' rack-cache (1.2) lib/rack/cache/context.rb:71:in
call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:incall' railties (3.2.17) lib/rails/engine.rb:484:in
call'
railties (3.2.17) lib/rails/application.rb:231:incall' railties (3.2.17) lib/rails/railtie/configurable.rb:30:in
method_missing'
rack (1.4.5) lib/rack/builder.rb:134:incall' rack (1.4.5) lib/rack/urlmap.rb:64:in
block in call'
rack (1.4.5) lib/rack/urlmap.rb:49:ineach' rack (1.4.5) lib/rack/urlmap.rb:49:in
call'
passenger (4.0.33) lib/phusion_passenger/rack/thread_handler_extension.rb:77:inprocess_request' passenger (4.0.33) lib/phusion_passenger/request_handler/thread_handler.rb:141:in
accept_and_process_next_request'
passenger (4.0.33) lib/phusion_passenger/request_handler/thread_handler.rb:109:inmain_loop' passenger (4.0.33) lib/phusion_passenger/request_handler.rb:440:in
block (3 levels) in start_threads'
ActionView::Template::Error (invalid byte sequence in UTF-8): 26: <% @csv_rows[0].each_with_index do |value, index| %> 27:
@balagab
We are still not able to replicate the issue with "Normál", Please provide the csv file.
@stpl Ok, how can I attache csv? (Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG.)
Thanks
Please find attached the csv.
From: Systango SysTech [mailto:notifications@github.com] Sent: Tuesday, October 28, 2014 4:00 PM To: stpl/csv_import_issues Cc: Balázs Gábor Subject: Re: [csv_import_issues] Internall error - accents (#10)
@balagabhttps://github.com/balagab
We are still not able to replicate the issue with "Normál", Please provide the csv file.
— Reply to this email directly or view it on GitHubhttps://github.com/stpl/csv_import_issues/issues/10#issuecomment-60769154.
Hi,
I also got internal error, but found out only when I use accents in the csv. Is there any solution to use accents? Maybe some char settings.
Thanks for this plugin! Gabor