Giter VIP home page Giter VIP logo

Comments (35)

KevinFasusi avatar KevinFasusi commented on May 25, 2024 1

@Arcnique Thanks Chris. I appreciate the vote of confidence. Congratulations on your first GitHub post and I am happy it was on this repo. It's great to meet someone from a purchasing background. Please feel free to share your ideas on how the library can better support your requirements. My email address is [email protected].

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,

Thanks for posting the issue here, I will take a look at them. I'm not an expert but thanks for the kind words. At first glance, there are several different issues.

As a first step, please navigate to the folder containing the data file. If there is already a reporting.db file in this folder, from your previous attempt to run the application, please delete the file.

Try running the following command in the folder with the .CSV file:

supplychainpy tiny.csv -a -loc ~/supplychainpy/csvdata/tiny.csv -l

It is important that you run the command inside the folder containing the .CSV.

Let me know how you get on.

I have immediately labelled this issue as a bug, as there is a need for better error handling as well as more direct solutions to the issues posted.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi Kevin,
After executing your command inside csvdata folder.. i got below error

Traceback (most recent call last):
File "/root/environments/my_env/bin/supplychainpy", line 11, in
load_entry_point('supplychainpy==0.0.4', 'console_scripts', 'supplychainpy')()
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/supplychain.py", line 151, in main
launch_load_report(args.filenames, args.location)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/launch_reports.py", line 221, in launch_load_report
launcher = tk.Tk()
File "/usr/lib/python3.5/tkinter/init.py", line 1871, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Okay, I guess you are using a *nix OS without a desktop environment. That is probably the reason you are getting a Tkinter error, which is why you were using the -lx argument in the first instance. Thanks for reading the docs on that one. Please try:

supplychainpy tiny.csv -a -loc ~/supplychainpy/csvdata/tiny.csv -lx --host 0.0.0.0

So, much like you did in the second attempt but within the directory with the .csv

edited: removed the colon after host.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,
supplychainpy tiny.csv -a -loc ~/supplychainpy/csvdata/tiny.csv -lx --host :0.0.0.0
Same error as last time

Traceback (most recent call last):
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
return fn()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 387, in connect
return _ConnectionFairy._checkout(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 516, in checkout
rec = pool._do_get()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1229, in _do_get
return self._create_connection()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 651, in __connect
connection = pool._invoke_creator(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
return dialect.connect(*cargs, **cparams)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 393, in connect
return self.dbapi.connect(*cargs, **cparams)
sqlite3.OperationalError: unable to open database file

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/root/environments/my_env/bin/supplychainpy", line 11, in
load_entry_point('supplychainpy==0.0.4', 'console_scripts', 'supplychainpy')()
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/supplychain.py", line 208, in main
load_db(file=args.filenames, location=args.location)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/launch_reports.py", line 253, in load_db
db.create_all()
File "/root/environments/my_env/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 1007, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/root/environments/my_env/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 999, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 3949, in create_all
tables=tables)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1928, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/lib/python3.5/contextlib.py", line 59, in enter
return next(self.gen)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1921, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2112, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
return fn()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 387, in connect
return _ConnectionFairy._checkout(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 516, in checkout
rec = pool._do_get()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1229, in _do_get
return self._create_connection()
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/pool.py", line 651, in __connect
connection = pool._invoke_creator(self)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
return dialect.connect(*cargs, **cparams)
File "/root/environments/my_env/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 393, in connect
return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,

I have tested the command on both macOS and Linux (Xubuntu Ubuntu 16.04.3 LTS) and the command works. So, I guess it is a system environment issue. I am hopping onto a VM without a desktop environment to see if I can replicate your problem. Can you tell me what OS and virtual environment manager you are using please (Conda, Virtualenv, pyenv...)?

Thanks

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin.

I am using digitalocean droplet for installing supplychainpy.
Distributor ID: Ubuntu
Release: 16.04
Codename: xenial
I am using Virtualenv . Kevin do you think this is problem?
I guess it is a system environment issue
How its installed if we have environment issue. Is that make sense?

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,

Please tell me your python version
how did you installed sqllite3?
I dont have any db file inside my csvdata folder.. that is the problem. How did you got reporting.db file?

what is the procedure to produce this file?

Thanks
chandran

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Thanks for the information. I will create a digitalocean droplet and replicate your environment. Yep, makes sense, I also think it might be an environment issue. Leave it with me, and I will get back to you as soon as possible.

In the interim, you may want to try setting up an environment on digitalocean with Anaconda and the Conda virtual environment manager. I have used Anaconda with this project. Regardless, it should work with other managers so I will look into this further.

The command you run to start the dashboard generates the 'reporting.db' file. The project works with Python >= 3.5. SQLite (sqlite3) is supported by Python so you should not have to install it separately.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,

currently i dont have MANIFEST.ini file in project.. because its gave me problem during installation.. because its having your computer location.

How should i change this file content. is that helpfull for you to help me

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

OK good to know. I don't think that the missing MANIFEST.ini file caused the problem we are working through currently. I will check that as well.

Did you clone the repository to your droplet and use python setup.py sdist?

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

yes kevin

I will paste commands to know what i did

git clone https://github.com/KevinFasusi/supplychainpy.git
cd supplychainpy/
56 pip install supplychainpy
57 sudo apt-get -y install cython
58 pip install supplychainpy
61 cd supplychainpy/
62 python setup.py sdist
63 pip install Numpy
64 pip install Pandas
65 pip install Flask
66 pip install Flask-Restful
68 pip install Flask-Restless
69 pip install Flask-ScriptFlask-Script
70 pip install Flask-Script
71 pip install Flask-SqlAlchemy
72 pip install Flask-Uploads
73 pip install Flask-WTF
74 pip install Scipy
75 pip install SqlAlchemy
76 pip install TextBlob
77 pip install matplotlib
78 pip install xlwings
79 pip install openpyxl

170 python setup.py sdist
171 cd dist/
172 pip install supplychainpy-0.0.4.tar.gz

In between i removed MANIFEST:INI file too

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,

I am trying Anaconda environment in digitalocean.. Let you know once its done

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,
I ran following command . Bold show changed items

supplychainpy tiny.csv -a -loc ~/environments/supplychainpy/supplychainpy/csvdata/ -lx --host 0.0.0.0

Now i got some improvement.. i hope from here you can help me very easily.. Now i got reporting.db file inside csvdata folder.

But i got below error. Its quite long i have highlighted only error. This time i copied success result too..

(my_env) root@SupplyChain:~/environments/supplychainpy/supplychainpy/csvdata# supplychainpy tiny.csv -a -loc ~/environments/supplychainpy/supplychainpy/csvdata/ -lx --host 0.0.0.0
5
loading currency symbols...[COMPLETED]

Analysing file: tiny.csv...2017-09-27 12:27:34,097 - INFO - Extracted unit cost for sku. SKU: KR202-209 UNIT COST: 1001
2017-09-27 12:27:34,098 - INFO - Extracted unit cost for sku. SKU: KR202-209 LEAD-TIME: 2
2017-09-27 12:27:34,099 - INFO - Extracted unit cost for sku. SKU: KR202-209 RETAIL PRICE: 5000
2017-09-27 12:27:34,099 - INFO - Extracted unit cost for sku. SKU: KR202-209 QUANTITY ON HAND: 1003
2017-09-27 12:27:34,099 - INFO - Extracted unit cost for sku. SKU: KR202-209 BACKLOG: 10
2017-09-27 12:27:34,100 - INFO - Extracted unit cost for sku. SKU: KR202-210 UNIT COST: 394
2017-09-27 12:27:34,100 - INFO - Extracted unit cost for sku. SKU: KR202-210 LEAD-TIME: 2
2017-09-27 12:27:34,100 - INFO - Extracted unit cost for sku. SKU: KR202-210 RETAIL PRICE: 1300
2017-09-27 12:27:34,101 - INFO - Extracted unit cost for sku. SKU: KR202-210 QUANTITY ON HAND: 3224
2017-09-27 12:27:34,101 - INFO - Extracted unit cost for sku. SKU: KR202-210 BACKLOG: 10
2017-09-27 12:27:34,101 - INFO - Extracted unit cost for sku. SKU: KR202-211 UNIT COST: 434
2017-09-27 12:27:34,102 - INFO - Extracted unit cost for sku. SKU: KR202-211 LEAD-TIME: 4
2017-09-27 12:27:34,102 - INFO - Extracted unit cost for sku. SKU: KR202-211 RETAIL PRICE: 1200
2017-09-27 12:27:34,102 - INFO - Extracted unit cost for sku. SKU: KR202-211 QUANTITY ON HAND: 390
2017-09-27 12:27:34,102 - INFO - Extracted unit cost for sku. SKU: KR202-211 BACKLOG: 10
2017-09-27 12:27:34,103 - INFO - Extracted unit cost for sku. SKU: KR202-212 UNIT COST: 474
2017-09-27 12:27:34,103 - INFO - Extracted unit cost for sku. SKU: KR202-212 LEAD-TIME: 3
2017-09-27 12:27:34,103 - INFO - Extracted unit cost for sku. SKU: KR202-212 RETAIL PRICE: 10
2017-09-27 12:27:34,104 - INFO - Extracted unit cost for sku. SKU: KR202-212 QUANTITY ON HAND: 390
2017-09-27 12:27:34,104 - INFO - Extracted unit cost for sku. SKU: KR202-212 BACKLOG: 10
2017-09-27 12:27:34,104 - INFO - FUNCTION: supplychainpy._helpers._data_cleansing.clean_orders_data_row_csv EXECUTION TIME: 0.00901835600961931 MESSAGE: clean orders data.
[COMPLETED]

Calculating Forecasts.../root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses1.pickle
/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses2.pickle
2017-09-27 12:27:34,182 - INFO - Simple exponential smoothing forecast for SKU: KR202-209
Object id: 139963528073568
2017-09-27 12:27:34,183 - INFO - Started simple exponential smoothing
2017-09-27 12:27:34,184 - INFO - Using solver version to find alpha.
2017-09-27 12:27:34,194 - INFO - Simple exponential smoothing forecast for SKU: KR202-210
Object id: 139963528073736
2017-09-27 12:27:34,197 - INFO - Started simple exponential smoothing
2017-09-27 12:27:34,198 - INFO - Using solver version to find alpha.
2017-09-27 12:27:58,695 - INFO - FUNCTION: Called public api for simple_exponential_smoothing_forecast..simple_exponential_smoothing_forecast EXECUTION TIME: 24.49820647999877 MESSAGE:
2017-09-27 12:27:58,701 - INFO - FUNCTION: supplychainpy.inventory.analyse_uncertain_demand._generate_optimised_ses_forecast EXECUTION TIME: 24.50370171200484 MESSAGE: Called to generate optimised SES forecast.
2017-09-27 12:27:58,925 - INFO - FUNCTION: Called public api for simple_exponential_smoothing_forecast..simple_exponential_smoothing_forecast EXECUTION TIME: 24.741879814013373 MESSAGE:
2017-09-27 12:27:58,926 - INFO - FUNCTION: supplychainpy.inventory.analyse_uncertain_demand._generate_optimised_ses_forecast EXECUTION TIME: 24.74290936201578 MESSAGE: Called to generate optimised SES forecast.
[Errno 2] No such file or directory: '/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses_forecast_results'
/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses1.pickle
/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses1.pickle
file not present. [Errno 2] No such file or directory: '/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses_forecast_results'
2017-09-27 12:27:58,961 - INFO - Holt's trend corrected exponential smoothing forecast for SKU: KR202-209
Object id: 139963528052632
2017-09-27 12:27:58,967 - INFO - Holt's trend corrected exponential smoothing forecast for SKU: KR202-210
Object id: 139963528043544
Argument 'individual' has incorrect type (expected tuple, got list)
[COMPLETED]

loading database ...[COMPLETED]

Loading recommendations into database... Traceback (most recent call last):
File "/root/environments/my_env/bin/supplychainpy", line 11, in
load_entry_point('supplychainpy==0.0.4', 'console_scripts', 'supplychainpy')()
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/supplychain.py", line 208, in main
load_db(file=args.filenames, location=args.location)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/launch_reports.py", line 255, in load_db
load.load(file, location)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/reporting/load.py", line 507, in load
load_recommendations(summary=ia, forecast=holts_forecast, analysed_order=orders_analysis)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/reporting/load.py", line 516, in load_recommendations
recommend = run_sku_recommendation(analysed_orders=analysed_order, forecast=forecast)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/bi/recommendation_generator.py", line 57, in run_sku_recommendation
recommend.run(sku.sku_id)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/bi/_recommendation_state_machine.py", line 76, in run
(new_state, sku_id) = handler(sku_id)
File "/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/bi/_recommendations.py", line 347, in forecast
if self._htces_forecast.get(sku)['statistics']['trend']:
TypeError: 'NoneType' object is not subscriptable
(my_env) root@SupplyChain:~/environments/supplychainpy/supplychainpy/csvdata#

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Please can you execute supplychainpy in your environment with my csv data.

Sku,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec,unit cost,lead-time,retail_price,quantity_on_hand,backlog
KR202-209,1509,1855,2665,1841,1231,2598,1988,1988,2927,2707,731,2598,1001,2,5000,1003,10
KR202-210,1006,206,2588,670,2768,2809,1475,1537,919,2525,440,2691,394,2,1300,3224,10
KR202-211,1840,2284,850,983,2737,1264,2002,1980,235,1489,218,525,434,4,1200,390,10
KR202-212,104,2262,350,528,2570,1216,1101,2755,2856,2381,1867,2743,474,3,10,390,10

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi Kevin,

What do you think regarding this error? How to solve those

2017-09-27 12:27:58,926 - INFO - FUNCTION: supplychainpy.inventory.analyse_uncertain_demand._generate_optimised_ses_forecast EXECUTION TIME: 24.74290936201578 MESSAGE: Called to generate optimised SES forecast.
[Errno 2] No such file or directory: '/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses_forecast_results'
/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses1.pickle
/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses1.pickle
file not present. [Errno 2] No such file or directory: '/root/environments/my_env/lib/python3.5/site-packages/supplychainpy/_pickled/ses_forecast_results'
2017-09-27 12:27:58,961 - INFO - Holt's trend corrected exponential smoothing forecast for SKU: KR202-209
Object id: 139963528052632
2017-09-27 12:27:58,967 - INFO - Holt's trend corrected exponential smoothing forecast for SKU: KR202-210
Object id: 139963528043544
Argument 'individual' has incorrect type (expected tuple, got list)

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi Kevin,

Please can you provide me sample csv file which loads perfectly for you.

Thanks
Chandran Nepolean

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins

I have been building the environment on a droplet as well. I get the same error:

TypeError: 'NoneType' object is not subscriptable

The TypeError is a separate issue with my code. I recently changed the 'load_script.py' to work on the forecasts in batches because the multiprocessing process pool would sometimes freeze with large files. I have introduced some bugs. I will work through them now and get back to you. When I get a stable install on the droplet, I will let you know so you can clone the repository again.

What you can do while I fix the TypeError issue, is use the 0.0.4 version of the library. I have just tested it on my droplet, and it works. The only problem is that in 0.0.4 the first page of charts is empty if you use the --host 0.0.0.0. This bug that has been fixed but is not currently in a packaged release. The javascript for the charts in this version uses a hardcoded HTTP location for the Ajax calls to the rest API. To work with the 0.0.4 release using:

wget https://github.com/KevinFasusi/supplychainpy/archive/0.0.4.tar.gz

Uninstall the current version of supplychainpy and install the file downloaded from the command above.

As for a file, you can use this file.

If you can test in an Ubuntu (with Desktop Environment) VM using the version above and localhost (instead of 0.0.0.0) you should be able to see the full dashboard at least for a test.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin

Thanks for your effort.
let me try this tar file and let you know

Thanks
Chandran

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi kevin,

Please mention here.. how did you installed in digital ocean droplets.. i mean command used.. because it will be helpful for me and any newbie coming over here.. Because you said its successfully installed right

Thanks
Chandran

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,

Sure, I used the following commands:

1. git clone https://github.com/KevinFasusi/supplychainpy.git
2. cd supplychainpy/
3. cd
4. curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
5. bash Anaconda3-4.2.0-Linux-x86_64.sh
6. conda create -n suchpy_env python=3.5
7. source activate suchpy_env
8. pip install Cython
9.  sudo apt update
10. sudo apt upgrade
11. sudo apt install gcc
12. cd supplychainpy/sample_data/
13. ls
14. cp complete_dataset_small.csv ~/
15. cd
16. source activate suchpy_env
17. export PATH=/root/anaconda3/bin:$PATH
18. wget https://github.com/KevinFasusi/supplychainpy/archive/0.0.4.tar.gz
19. pip install 0.0.4.tar.gz
20. supplychainpy complete_dataset_small.csv -a -loc ~/ -lx --host 0.0.0.0

I will write a wiki with a more detailed explanation for using the library with a default route 0.0.0.0 on a server or VPS instead of GUI environment. Thank you for taking the time to explain your issues.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi Kevin

If i run your command i am not getting any error but i got struck here

(suchpy_env) root@SupplyChain:~/supplyconda/supplychainpy/supplychainpy/sample_data# supplychainpy complete_dataset_small.csv -a -loc ~/supplyconda/supplychainpy/supplychainpy/sample_data/ -lx --host 0.0.0.0
5
loading currency symbols...[COMPLETED]

Analysing file: complete_dataset_small.csv...[COMPLETED]

its freezing here.. is that common?

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,

It's likely not freezing; It may take a few minutes to complete. In this release, the next statement 'Calculating Forecasts...' does not print to the console before completing because the thread is busy. The console log works as expected in the repository, however, is not published in a release. Release 0.0.5 will have a more verbose output, as you have seen from building from the source in the repository.

It has been a while since your comment has it finished?

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

yes Kevin its loading fine. Thanks for your help..

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Please access this url http://104.131.1.142:5000/ and please let me know why first page is empty. Is that know bug Kevin?

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,

Yes, that is the bug in 0.0.4. That only happens when you run the dashboard on a server as a standalone application. If you run on a client using localhost the first front page charts also load. I wish I had caught this before the release.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

ok thanks for your information Kevin. Have a nice evening :)

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Thanks, you too Chandran.

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @chandrantwins,
I have finally fixed the issue with running the dashboard on a public route (i.e. using --host 0.0.0.0). When you can, please check that the fixes work for you on a DigitalOcean droplet:

1.  git clone https://github.com/KevinFasusi/supplychainpy.git
2. cd supplychainpy/
3. cd
4. curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
5. bash Anaconda3-4.2.0-Linux-x86_64.sh
6. conda create -n suchpy_env python=3.5
7. source activate suchpy_env
8. pip install Cython
9. python -m textblob.download_corpora
10.  sudo apt update
11. sudo apt upgrade
12. sudo apt install gcc
13. cd supplychainpy/sample_data/
14. ls
15. cp complete_dataset_small.csv ~/
16. cd
17. source activate suchpy_env
18. export PATH=/root/anaconda3/bin:$PATH
19. cd  supplychainpy
20. python setup.py bdist_wheel
21. cd dist/
22. pip install supplychainpy-0.0.5.tar.gz
23. cd
24. supplychainpy complete_dataset_small.csv -a -loc ~/ -lx --host 0.0.0.0 --debug

If when you load the page there is an error. Stop all process and from the root directory, where you ran the last command, run:

(suchpy_env)$ supplychainpy -loc ~/ -lx --host 0.0.0.0 --debug

Please let me know how you get on. Thanks.

from supplychainpy.

chandrantwins avatar chandrantwins commented on May 25, 2024

Hi Kevin,
I am busy with other project. so i cannot check now.. Please close this issue. I will check and let you know by email

from supplychainpy.

ctycer avatar ctycer commented on May 25, 2024

@KevinFasusi I've also been trying to set this up on a Digital Ocean droplet with public route. I'm a layman but I followed your commands pasted here and I was able to access the dashboard remotely but all the formatting and everything was messed up. Before I start over and try and figure out where I went wrong. Does SupplyChainPy even support a setup like this or should I stick with local install only for now?

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi @Arcnique,

Sorry, I missed this comment. You did not make a mistake. I experienced the same thing too when clicking through to the SKU detail view. You probably started the attempt before I caught the issue. This problem was with the path to the bootstrap.css file. I have corrected this issue.

Yes, the library should support access remotely. I aimed to support the deployment for remote access. Unfortunately, when the issue with the public route occurred, I was still working through the problem with getting the load script to process large files and use concurrency. I have recently circled back to the public route issue.

I am currently writing up a 'How to Deploy to Server' wiki. As I write this, I am just testing the commands from beginning to end on a Droplet. I should be done tomorrow if you do not mind waiting.

Thanks for taking the time to work through the command, testing features and commenting back here. I think I missed this post because the issue is closed. Please feel free to raise a new issue ticket next time, so your comment is more visible.

from supplychainpy.

ctycer avatar ctycer commented on May 25, 2024

@KevinFasusi Thanks Kevin, this is actually my first Git comment and I knew I was doing it wrong ;). I'll wait for your Wiki to come out. Keep up the good work, as someone coming from a Purchasing background, we need more open source tools like yours.

from supplychainpy.

KevinFasusi avatar KevinFasusi commented on May 25, 2024

Hi Chris (@Arcnique),
I posted the wiki. A caveat, the recommendations and simple exponential smoothing forecast are not present in the reports when testing on the cloud server. I am looking into this issue now. However, the wiki guide works for checking the application on a remote server. I will update you again when I have completed the wiki with the second method and fixed the issue.

Have a good weekend.

from supplychainpy.

ctycer avatar ctycer commented on May 25, 2024

@KevinFasusi Thanks Kevin, I'll test it out this weekend.

from supplychainpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.