Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8): #44

Closed
tarebyte opened this issue Jan 6, 2015 · 8 comments · Fixed by #47
Closed

Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8): #44

tarebyte opened this issue Jan 6, 2015 · 8 comments · Fixed by #47

Comments

@tarebyte
Copy link
Contributor

tarebyte commented Jan 6, 2015

When trying to add a new project (https://github.com/github/hub)

Started POST "/projects" for ::1 at 2015-01-06 11:38:50 -0500
Processing by ProjectsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[REDACTED]", "project"=>{"github_url"=>"https://github.com/github/hub"}, "commit"=>"Add"}
  User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
  Project Load (0.3ms)  SELECT  "projects".* FROM "projects" WHERE (lower(owner) = lower('github') AND lower(name) = lower('hub')) LIMIT 1
   (0.1ms)  BEGIN
  Project Exists (0.2ms)  SELECT  1 AS one FROM "projects" WHERE (LOWER("projects"."name") = LOWER('hub') AND "projects"."owner" = 'github') LIMIT 1
  SQL (0.1ms)  INSERT INTO "projects" ("owner", "name") VALUES ($1, $2) RETURNING "id"  [["owner", "github"], ["name", "hub"]]
  Project Exists (0.5ms)  SELECT  1 AS one FROM "projects" WHERE (LOWER("projects"."name") = LOWER('hub') AND "projects"."id" != 7 AND "projects"."owner" = 'github') LIMIT 1
  SQL (0.2ms)  UPDATE "projects" SET "owner" = $1, "name" = $2, "id" = $3, "github_id" = $4, "description" = $5, "homepage" = $6, "main_language" = $7 WHERE "projects"."id" = $8  [["owner", "github"], ["name", "hub"], ["id", 7], ["github_id", 401025], ["description", "hub helps you win at git."], ["homepage", "http://hub.github.com/"], ["main_language", "Go"], ["id", 7]]
   (0.2ms)  ROLLBACK
Completed 500 Internal Server Error in 1242ms

Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8):
  app/models/project.rb:109:in `open_issues'
  app/models/project.rb:88:in `update_issues'
  app/models/project.rb:53:in `update_info'
  app/models/project.rb:20:in `create_from_github_url'
  app/controllers/projects_controller.rb:28:in `create'
@andrew
Copy link
Member

andrew commented Jan 6, 2015

Cc @wadtech

@wadtech
Copy link
Collaborator

wadtech commented Jan 6, 2015

Hey @tarebyte

Could you please try launching the app with an application token?

OCTOKIT_TOKEN=xxxxx bundle exec rails s

You can generate them from your Github settings under 'Applications'. Generate an Access Token and paste it instead of the x's.

I get this error without my token and don't when I include it.

If it's the same for you (or you, @andrew) I'll try and narrow it down a bit further.

@andrew
Copy link
Member

andrew commented Jan 6, 2015

I saw it in development yesterday just before I went to bed as well, not investigated it yet though

@tarebyte
Copy link
Contributor Author

tarebyte commented Jan 6, 2015

@wadtech just tried it with the OCTOKIT_TOKEN worked perfectly

@wadtech
Copy link
Collaborator

wadtech commented Jan 6, 2015

OK thanks for that, I'll see if I can find anything more.

@tarebyte
Copy link
Contributor Author

tarebyte commented Jan 6, 2015

This is what I get for not reading before typing

screen shot 2015-01-06 at 5 43 03 pm

@tarebyte
Copy link
Contributor Author

tarebyte commented Jan 6, 2015

This is just doing what you described above

@wadtech
Copy link
Collaborator

wadtech commented Jan 6, 2015

Aside from the suspect markdown parsing (looks truncated) it should work OK with an access token just for now.

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

Successfully merging a pull request may close this issue.

3 participants