11

I am trying to deploy some Django code to an AWS Elastic Beanstalk Environment. I am getting a deployment error:

The configuration file __MACOSX/OriginalNewConfig-deploy/.ebextensions/._python.config in application version OriginalNewConfig2-deploy contains invalid YAML or JSON. YAML exception: unacceptable character '' (0x0) special characters are not allowed in "<reader>", position 0, JSON exception: Unexpected character () at position 0.. Update the configuration file.

The python.config file (in the .ebextensions folder) looks like this:

--- 
container_commands: 
  01_wsgipass: 
    command: "echo \"WSGIPassAuthorization On\" >> ../wsgi.conf"
packages: 
  yum: 
    libjpeg-turbo-devel: []

The deployment code I am using has apparently been successfully deployed before (by the original developer) so I do not understand why an error is being reported.

I am deploying by using the 'Upload and Deploy' button in the AWS EB dashboard.

Bill Noble
  • 6,466
  • 19
  • 74
  • 133
  • 1
    This looks to be a cross site duplicate from Server Fault: http://serverfault.com/questions/571664/error-when-customising-ec2-instance-php-ini-file-on-aws – ydaetskcoR Dec 19 '15 at 17:11

2 Answers2

53

Seems like MAC creates this hidden folder automatically. I was also having this issue.

I've used the following command on terminal:

zip -d filename.zip __MACOSX/\*

found here: Mac zip compress without __MACOSX folder?

Community
  • 1
  • 1
Jaqueline Passos
  • 1,301
  • 2
  • 24
  • 37
0

I had a same problem. I try to do remove the __MACOSX/ in zip file. but there were other problem came up.

AWS doc suggest that Creating a source bundle from command line:

zip -d filename.zip __MACOSX/\*