Comments (6)
Few things. Confused why your directory structure for your venv is saying both Kijiji-Repost-Headless
and Kijiji-Reposter
in the error? The headless project is ArthurG's Project and has nothing to do with this project.
At the bottom of your error message it's saying it can't find the schedules.json file which should be located in the static folder. So make sure that file exists in the proper directory. Otherwise, could be something to do with file or directory referencing in your venv? Basically, the home.html
file is calling the template filter checkschedule
in server.py:
@app.template_filter('checkSchedule')
def checkSchedule(adID):
with open('static/schedules.json', 'r') as f:
data = json.load(f)
So when the function attempts to open static/schedules.json
, it's returning None and causing the error.
When you say "post" data, are you trying to post an ad? If there were any api errors or issues, they would be parsed and printed to the console.
from kijiji-reposter.
Sorry, I was trying to run both projects, for your project "Kijiji-Reposter" I got some relative paths problem I think. I tried to replace the path to absolute path like: "os.path.dirname(os.path.abspath(file))"
Replacing this path errors will go, yet not tested fully, in posting methods got some errors mostly os related permission and path related. Once I tested full functionality I will send you full reports.
Thanks anyway for your time and I am new in python, so for any kind of silly questions you have to excuse me.
Ref link: https://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/
from kijiji-reposter.
No Worries. Python should be interpreting the file references as being from within the immediate directory and shouldn't require OS path calls. Has been tested across multiple platforms successfully (windows, mac, linux). My guess is your venv setup. Personally, I use a combination of pyenv and poetry to manage my virtual environments on mac. No activation / deactivation required, and just cleaner. Requires a bit of $PATH setup for your terminal, but I found it to be a little easier to work with once you get it going. Poetry Setup Guide (Might require some changes, as it's a little dated)
An example of my working .zshrc
after successful setup:
#SDKROOT
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
#pyenv
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# Created by `userpath` on 2019-11-01 14:14:03
export PATH="$PATH:/Users/rybodiddly/.local/bin"
# poetry
export PATH="$HOME/.poetry/bin:$PATH"
# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
#Required for LZO installation with pip / poetry
#export C_INCLUDE_PATH=$(brew --cellar lzo)/2.10/include/lzo:$(brew --cellar lzo)/2.10/include/:$(brew --cellar lzfse)/1.0/include/
#export LIBRARY_PATH=/usr/local/lib
# commands to override pip restriction above.
# use `gpip` or `gpip3` to force installation of
# a package in the global python environment
# Never do this! It is just an escape hatch.
gpip(){
PIP_REQUIRE_VIRTUALENV="" pip "$@"
}
gpip3(){
PIP_REQUIRE_VIRTUALENV="" pip3 "$@"
}
from kijiji-reposter.
Thanks let me try to setup venv as you said
from kijiji-reposter.
Went through and set relative paths for you. See if this solves your issue. Makes more sense then you uprooting your current environment setup. If it works, I'll merge it to the master branch to incorporate a wider range of compatibility. Seems to work for me, but don't have time to test it thoroughly.
from kijiji-reposter.
This issue is being closed. absolute path support has been merged into the master branch and should be resolved.
from kijiji-reposter.
Related Issues (20)
- Incorrect Location via Postal Code HOT 3
- Reposting doesnโt work HOT 2
- Add tags to the listing HOT 3
- Idea for expanding project HOT 2
- New Kijiji Update Broke LoginFunction? HOT 5
- TypeError: 'NoneType' object is not subscriptable HOT 5
- No edit button for existing ads on schedule HOT 3
- Listing fails to stay active after a 'successful' repost HOT 5
- [FEATURE] Running via script HOT 1
- urllib.error.URLError HOT 1
- [FR] Docker HOT 1
- ModuleNotFoundError: No module named 'pgeocode' HOT 1
- Raspberry Pi error: numpy.ndarray size changed HOT 1
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired HOT 2
- Kijiji Max Attribute Lengths
- Unable to post pictures
- Unable to post ads with pictures HOT 2
- AutoReplier raised an exception HOT 1
- on posting ads HOT 2
- Coverting in No-SQL Database HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kijiji-reposter.