Need to see your Apache configuration for mod_wsgi, but it looks like you used 
SetHandler to map wsgi-script to a directory containing them. You would rarely 
use SetHandler or AddHandler when setting up mod_wsgi. Use them and do it wrong 
and it could cause issues like this.

Graham

> On 13 Mar 2019, at 9:02 am, KWL <[email protected]> wrote:
> 
> Hi Folks, 
> 
> Have searched doc and others postings, on every search term I can think of to 
> run this down, but have not found why this is happening. 
> 
> Why is WSGI parsing and validating the CSS and .js files in the assets 
> directory, and throwing invalid syntax errors, and when the syntax is 
> perfectly fine? 
> 
> I know Dash looks in the assets directory for statics, for css and js, but 
> then, again why are these files being flagged, and why when they are 
> perfectly valid css and js files? 
> 
> [wsgi:error] Attempt to invoke directory as WSGI application: 
> /var/www/Reports/
> [wsgi:error] Attempt to invoke directory as WSGI application: 
> /var/www/Reports/
> [wsgi:info] [mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Loading WSGI script '/var/www/Reports/assets/stylesheet.css'.
> [wsgi:error]  mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Failed to parse WSGI script file '/var/www/Reports/assets/stylesheet.css'.
> [wsgi:error]  mod_wsgi (pid=24436): Exception occurred processing WSGI script 
> '/var/www/Reports/assets/stylesheet.css'.
> [wsgi:error]    File "/var/www/Reports/assets/stylesheet.css", line 1
> [wsgi:error]      /*
> [wsgi:error]      ^
> [wsgi:error]  SyntaxError: invalid syntax
> [wsgi:info]  [mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Loading WSGI script '/var/www/Reports/assets/stylesheet2.css'.
> [wsgi:error]  mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Failed to parse WSGI script file '/var/www/Reports/assets/stylesheet2.css'.
> [wsgi:error]  mod_wsgi (pid=24436): Exception occurred processing WSGI script 
> '/var/www/Reports/assets/stylesheet2.css'.
> [wsgi:error]    File "/var/www/Reports/assets/stylesheet2.css", line 1
> [wsgi:error]      /*
> [wsgi:error]      ^
> [wsgi:error]  SyntaxError: invalid syntax
> [wsgi:info]  [mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Loading WSGI script '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]  mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Failed to parse WSGI script file '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]  mod_wsgi (pid=24436): Exception occurred processing WSGI script 
> '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]    File "/var/www/Reports/assets/plotly_ga.js", line 1
> [wsgi:error]      
> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
> [wsgi:error]                              ^
> [wsgi:error]  SyntaxError: invalid syntax
> [wsgi:info]  [mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Loading WSGI script '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]  mod_wsgi (pid=24436, process='HelloWorld', application=''): 
> Failed to parse WSGI script file '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]  mod_wsgi (pid=24436): Exception occurred processing WSGI script 
> '/var/www/Reports/assets/plotly_ga.js'.
> [wsgi:error]    File "/var/www/Reports/assets/plotly_ga.js", line 1
> [wsgi:error]      
> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
> [wsgi:error]                              ^
> [wsgi:error]  SyntaxError: invalid syntax
> [wsgi:error]  Attempt to invoke directory as WSGI application: 
> /var/www/Reports/
> [mpm_event:notice] AH00493: SIGUSR1 received.  Doing graceful restart
> 
> Thanks,
> KWL
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to