Why does my Library Mgt App file structure look different from the docs? Updates?

I expected this according to the docs:

.
├── MANIFEST.in
├── README.md
├── library_management
..
│   ├── library_management
│   │   ├── __init__.py
│   │   └── doctype
│   │       ├── __init__.py
│   │       ├── article
│   │       │   ├── __init__.py
│   │       │   ├── article.json
│   │       │   └── article.py
│   │       ├── library_member
│   │       │   ├── __init__.py
│   │       │   ├── library_member.json
│   │       │   └── library_member.py
│   │       ├── library_membership
│   │       │   ├── __init__.py
│   │       │   ├── library_membership.json
│   │       │   └── library_membership.py
│   │       └── library_transaction
│   │           ├── __init__.py
│   │           ├── library_transaction.json
│   │           └── library_transaction.py

But I’m seeing this instead:

frappe@ubuntu:~/frappe-bench$ ls apps/library_management/library_management
config    hooks.pyc    __init__.pyc        modules.txt  public     www
hooks.py  __init__.py  library_management  patches.txt  templates

frappe@ubuntu:~/frappe-bench$ ls apps/library_management/library_management/library_management
__init__.py  __init__.pyc

Note the absence of doctype directory.

Is there an update to Frappe file structure. If so What’s the new situation?

Secondly, Why do I have another library_management within apps/library_management/library_management ?

1 Like

try doing a bench restart from the cli or reload from the desk

Thanks for your answer. Please note that all is functioning just fine within the browser. It’s in the backend where I cannot locate the DocType files being presented in the browser. I’m searching around the app files.

Without knowing the location of the docs I cannot proceed with the custom scripting tutorial :frowning:

doctype will be created automatically at the backend when you create one on the frond end corresponding to ur custom module…

I have created the DocTypes already and they’re working fine but I cant see the files. Please see below:

But still no DocType files in the module:

frappe@ubuntu:~/frappe-bench/apps/library_management$ ls
library_management           license.txt  README.md         setup.py
library_management.egg-info  MANIFEST.in  requirements.txt  setup.pyc
frappe@ubuntu:~/frappe-bench/apps/library_management$ cd library_management
frappe@ubuntu:~/frappe-bench/apps/library_management/library_management$ ls
config    hooks.pyc    __init__.pyc        modules.txt  public     www
hooks.py  __init__.py  library_management  patches.txt  templates
frappe@ubuntu:~/frappe-bench/apps/library_management/library_management$ cd library_management
frappe@ubuntu:~/frappe-bench/apps/library_management/library_management/library_management$ ls
__init__.py  __init__.pyc
frappe@ubuntu:~/frappe-

Hmmm? Perhaps its something to do with having a production environment? I’m using the Production VM.

maybe…you should be in developer mode

1 Like

I’ll try that

do a bench restart too

I have tried with no effect! :sweat_smile:

can u show ur site_config.json file

did u do bench reload/restart

Yes, Nothing!

sit_config.json ??

{
 "db_name": "1bd3e0294da19198", 
 "db_password": "VpX1JJNKputV2VJl", 
 "developer_mode": 1, 
 "limits": {
  "space_usage": {
   "backup_size": 1.0, 
   "database_size": 13.51, 
   "files_size": 2.0, 
   "total": 16.51
  }
 }, 
 "nginx_port": 8001
}

try doing a reload from the desk (from ur user account)

try bench clear-cache

No change

hmm…

Thank you for your effort. Do you know how to switch from Production to Development?

Running bench start only runs into errors

frappe@ubuntu:~/frappe-bench$ bench start
22:28:47 system           | worker_long.1 started (pid=30913)
22:28:47 system           | redis_socketio.1 started (pid=30914)
22:28:47 redis_socketio.1 | 30924:M 17 Aug 22:28:47.174 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:28:47 redis_socketio.1 | 30924:M 17 Aug 22:28:47.174 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
22:28:47 system           | redis_socketio.1 stopped (rc=1)
22:28:47 system           | watch.1 started (pid=30917)
22:28:47 system           | redis_queue.1 started (pid=30915)
22:28:47 redis_queue.1    | 30926:M 17 Aug 22:28:47.185 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:28:47 redis_queue.1    | 30926:M 17 Aug 22:28:47.185 # Creating Server TCP listening socket 127.0.0.1:11000: bind: Address already in use
22:28:47 system           | redis_queue.1 stopped (rc=1)
22:28:47 system           | schedule.1 started (pid=30916)
22:28:47 system           | web.1 started (pid=30918)
22:28:47 system           | worker_default.1 started (pid=30919)
22:28:47 system           | socketio.1 started (pid=30920)
22:28:47 system           | worker_short.1 started (pid=30938)
22:28:47 system           | redis_cache.1 started (pid=30928)
22:28:47 system           | sending SIGTERM to worker_long.1 (pid 30913)
22:28:47 system           | sending SIGTERM to watch.1 (pid 30917)
22:28:47 system           | sending SIGTERM to web.1 (pid 30918)
22:28:47 system           | sending SIGTERM to schedule.1 (pid 30916)
22:28:47 system           | sending SIGTERM to worker_default.1 (pid 30919)
22:28:47 system           | sending SIGTERM to socketio.1 (pid 30920)
22:28:47 system           | sending SIGTERM to redis_cache.1 (pid 30928)
22:28:47 system           | sending SIGTERM to worker_short.1 (pid 30938)
22:28:47 redis_cache.1    | 30941:M 17 Aug 22:28:47.351 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:28:47 redis_cache.1    | 30941:M 17 Aug 22:28:47.351 # Creating Server TCP listening socket 127.0.0.1:13000: bind: Address already in use
22:28:47 system           | redis_cache.1 stopped (rc=1)
22:28:47 system           | watch.1 stopped (rc=-15)
22:28:47 system           | worker_long.1 stopped (rc=-15)
22:28:47 system           | web.1 stopped (rc=-15)
22:28:47 system           | schedule.1 stopped (rc=-15)
22:28:47 system           | worker_default.1 stopped (rc=-15)
22:28:47 system           | socketio.1 stopped (rc=-15)
22:28:47 system           | worker_short.1 stopped (rc=-15)

Hello

“127.0.0.1:11000: bind: Address already in use”

This means your previous server instance did not shutdown cleanly.

To kill those orphan processes run ‘sudo supervisorctl stop all’

That usually works for me…

1 Like