Mobileread
Content Server - error with missing file
#1  txwindsurfer 07-25-2018, 02:50 PM
Short version: When I try to start the Content server on Windows 10, I'm now getting this error message:

calibre, version 3.28.0
ERROR: Failed to start Content server: Could not start the Content server. Error:

[Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Calibre2\\app\\imgsrc\\srv\\generate.py'

I started getting this error after I started the installation of a separate calibre development environment. The prod environment is in a separate folder & drive from my regular installation. I don't even have a batch file setup or running yet to switch between the two.

The thing is, this "app" folder doesn't exist directly under the Calibre2 folder. It should be Calibre2\imgsrc\...

Any suggestions on what I may be causing this and where to look?


--------------
Some futher details:

I've been running Calibre server for personal use on my local Windows 10 machine for a couple months and love it.
Last week I decided to start setting up a development environment to dabble with plugin development. So I cloned the calibre branch from github into a separate folder on my machine (actually, on a separate drive from my main calibre installation).
I was going through the instructions a step at a time from the "Setting up a development environment" calibre help pages, and got partly through the "Having separate “normal” and “development” calibre installs on the same computer" section on that page.
After having completed part of this, I am no longer able to run the Content server in my primary calibre environment. I'm getting the error I pasted above.
Reply 

#2  DNSB 07-25-2018, 03:09 PM
Quote txwindsurfer
Short version: When I try to start the Content server on Windows 10, I'm now getting this error message:

calibre, version 3.28.0
ERROR: Failed to start Content server: Could not start the Content server. Error:

[Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Calibre2\\app\\imgsrc\\srv\\generate.py'

I started getting this error after I started the installation of a separate calibre development environment. The prod environment is in a separate folder & drive from my regular installation. I don't even have a batch file setup or running yet to switch between the two.

The thing is, this "app" folder doesn't exist directly under the Calibre2 folder. It should be Calibre2\imgsrc\...

Any suggestions on what I may be causing this and where to look?
Hmmm... When I look on my computer, there is an app directory in the Calibre2 directory which is in Program Files since I installed the 64 bit version of calibre. There is no generate.py file in that directory or subdirectories.

If you remove your development version, does calibre server start working again? If not, you might want to try uninstalling and then re-installing the main calibre instance.
Reply 

#3  txwindsurfer 07-25-2018, 03:11 PM
I just now found the "culprit". I just delete the CALIBRE_DEVELOP_FROM environment variable I had set last week, and now the server starts. And no error.
I'm not sure how that was causing the issue and if anyone can explain I'd appreciate it. I had the variable set under System Properties > Environment Variables > System Variables
Reply 

#4  txwindsurfer 07-25-2018, 03:16 PM
David, that's interesting. I'm pretty consistent on keeping the program updated, being currently on the latest version. Maybe I should try a re-install of the main instance and then adding the environment variable back in.
Reply 

#5  davidfor 07-25-2018, 10:24 PM
Quote txwindsurfer
I just now found the "culprit". I just delete the CALIBRE_DEVELOP_FROM environment variable I had set last week, and now the server starts. And no error.
I'm not sure how that was causing the issue and if anyone can explain I'd appreciate it. I had the variable set under System Properties > Environment Variables > System Variables
That environment variable is used when you want to run calibre from source. It points to where the source code is. If the needed source files are not in that location, then calibre will fail.

For development, I don't set the environment variable globally. I use a batch wrapper script that does the setup needed and starts calibre-debug. That way I can run different versions if needed or the released code with no changes.
Reply 

#6  Divingduck 07-27-2018, 05:40 AM
Same for me.
In addition a quick check for environment variables is easy and always a good idea if someone doing this kind of manipulations. Simply run a cmd window and type set calibre and you will see all environment variables starting with calibre, if they exist. calibre environment variables start with CALIBRE_...
https://manual.calibre-ebook.com/customize.html
Reply 

Today's Posts | Search this Thread | Login | Register