Trying to access LFS in streamlit through github URL but it's giving me this error

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed? - deployed

  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform? - community cloud

    b. Share the link to the public deployed app. - Streamlit (crimeprediction.streamlit.app)

  3. Share the link to your app’s public GitHub repository (including a requirements file).
    GitHub - Yasasree-Singam/Data-Mining-Project: Data Mining Project implementation

  4. Share the full text of the error message (not a screenshot).
    http.client.InvalidURL: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
    Traceback:
    File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
    exec(code, module.dict)
    File “/mount/src/data-mining-project/App.py”, line 10, in
    from classification import train_random_forest, train_svm, train_knn, plot_confusion_matrix
    File “/mount/src/data-mining-project/classification.py”, line 17, in
    X_train, X_valid, X_test, y_train, y_valid, y_test, le_crime, transformer = preprocess_data()
    File “/mount/src/data-mining-project/preprocessing.py”, line 10, in preprocess_data
    data_balance, crime = clean_data()
    File “/mount/src/data-mining-project/data_cleaning.py”, line 13, in clean_data
    crime = pd.read_csv(crime_data_url)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/readers.py”, line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/readers.py”, line 611, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/readers.py”, line 1448, in init
    self._engine = self._make_engine(f, self.engine)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/readers.py”, line 1705, in _make_engine
    self.handles = get_handle(
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/common.py”, line 718, in get_handle
    ioargs = _get_filepath_or_buffer(
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/common.py”, line 372, in _get_filepath_or_buffer
    with urlopen(req_info) as req:
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/common.py”, line 274, in urlopen
    return urllib.request.urlopen(*args, **kwargs)
    File “/usr/local/lib/python3.9/urllib/request.py”, line 214, in urlopen
    return opener.open(url, data, timeout)
    File “/usr/local/lib/python3.9/urllib/request.py”, line 517, in open
    response = self._open(req, data)
    File “/usr/local/lib/python3.9/urllib/request.py”, line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
    File “/usr/local/lib/python3.9/urllib/request.py”, line 494, in _call_chain
    result = func(*args)
    File “/usr/local/lib/python3.9/urllib/request.py”, line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
    File “/usr/local/lib/python3.9/urllib/request.py”, line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
    File “/usr/local/lib/python3.9/http/client.py”, line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
    File “/usr/local/lib/python3.9/http/client.py”, line 1296, in _send_request
    self.putrequest(method, url, **skips)
    File “/usr/local/lib/python3.9/http/client.py”, line 1130, in putrequest
    self._validate_path(url)
    File “/usr/local/lib/python3.9/http/client.py”, line 1230, in _validate_path
    raise InvalidURL(f"URL can’t contain control characters. {url!r} "

  5. Share the Streamlit and Python versions.
    folium==0.14.0
    geopandas==0.14.1
    joblib==1.3.2
    matplotlib==3.5.1
    numpy==1.21.5
    pandas==1.4.2
    plotly==5.6.0
    scikit_learn==1.3.2
    streamlit==1.17.0
    streamlit_folium==0.16.0
    holidays==0.38

Hey @Yasasree-Singam,

Thanks for sharing your question. How can I reproduce the error? I’m interacting with the app but not seeing an error

Hello @Caroline

Thanks for the quick response
I reduced my file size to less than 20mb and started running my app as the issue was still persisting at that moment.