I'm trying to write a json serialization of data to a json file stored in my plugin directory. The plugin is called buildrequests and the file is found at buildrequestsplugin\buildrequestsplugin\buildrequests\htdocs\json
The error message written to the log is: Trac[buildrequests] ERROR: Exception occured writing to file: [Errno 2] No > such file or directory: 'buildrequests/json/breqs.json' > Traceback (most recent call last): > File "build\bdist.win32\egg\buildrequests\buildrequests.py", line 109, > in process_request > file = open(breq_file, 'w') > IOError: [Errno 2] No such file or directory: > 'buildrequests/json/breqs.json' where breq_file is 'buildrequests/json/breqs.json'. The same occurs if the breq_file is changed to 'buildrequests/htdocs/breqs.json'. 'buildrequests' is defined as the directory to reference to my htdocs and works for my javascript and css files and I have a reference in package_data in setup.py to 'htdocs/json/*' and so I'm running out of ideas - the only thing I can think of is that it might work if I were to move the file outside the main plugin directory i.e. outside the egg? -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/Y8blxxKgY8sJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
