Error when creating pages with Canvas API

Jump to solution
mcarruth
Community Contributor

I am writing a tool to move Moodle courses to Canvas.  The basic process is to run SQL scripts to extract data from the Moodle database and then to use the Canvas API to create the corresponding items in Canvas.  I have run into an issue.  Some of my pages will create, others will not.  The error I am getting is shows in the debug output below.  How can I determine what is causing the internal_server_error?  Are there any special rules on the wiki_page[body] content?  (html/css is included in the wiki_page[body])

The debug output below is an example of on of the pages that failed.

error_canvas_api.PNG

Labels (1)
1 Solution
mcarruth
Community Contributor

Solution found: the data must be UTF8 encoded prior to passing to Canvas API.

View solution in original post