Comments (10)
I need to release a new version of vera and wq.db. In the meantime, you can install the master versions directly from github:
sudo pip3 uninstall -y wq.db
sudo pip3 install https://github.com/wq/wq.db/archive/master.zip
sudo pip3 uninstall -y wq.app
sudo pip3 install https://github.com/wq/wq.app/archive/master.zip
sudo pip3 uninstall -y wq.start
sudo pip3 install https://github.com/wq/wq-django-template/archive/master.zip
sudo pip3 uninstall -y vera
sudo pip3 install https://github.com/wq/vera/archive/master.zip
from vera.
That seems to have solved one problem and revealed another (very similar) one:
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/Users/user/Development/python/try.wq.io-master/db/campaigns/models.py", line 69, in <module>
reversion.register(patterns.Identifier)
AttributeError: 'module' object has no attribute 'register'
Should I be using a different version of reversion also?
from vera.
Would it help me to have a pip requirements.txt file from a freeze of your installation, so I would know the exact versions I need to install of whatever different packages?
from vera.
It sounds like you might have reversion installed instead of django-reversion.
Yes, I really should put in a requirements.txt - see wq/wq-django-template#16.
from vera.
That was it. I needed django-reversion. So now I have the app almost running, but with a javascript error:
cannot set property debug of type 'undefined'
Ideas?
from vera.
What does your trywq/config.js
look like? It should have a template
property set.
from vera.
Ok. I started fresh. Same virtual environment with dependencies in place. clone the try.wq.io repo into a fresh folder, and tried to deploy. Now I get this:
./deploy.sh: line 7: app/js/data/config.js: No such file or directory
There is no app/js/data
folder, just as there is none in try.wq.io
repository.
So. I changed that line to look for app/js/trywq/config.js
. Now I get this:
FileNotFoundError: [Errno 2] No such file or directory: 'js/data/version.js'
So I switched that line back to app/js/data/config.js
. Then I created the folder data
in the app/js
folder as well as three empty files config.js
, templates.js
, version.js
.
I tried to deploy again. Deployment seems to have worked. But I am getting the same cannot set property 'debug' of undefined
.
So, to answer your question, inside the trywq/config.js
file, there are no references the word template anywhere. Whereas, the trywq/config.js
file on the try.wq.io
repo has the template definition in it. Keep in mind, I just cloned this from the repo and haven't changed anything in the app/js/trywq
folder. All I've done is run the deploy script. My trywq/config.js
file looks like this:
define({
"attachmentTypes": {
"parameter": {
"predicate": "has_parameters",
"type": null
},
"result": {
"predicate": "has_results",
"type": "parameter"
}
},
"debug": true,
"map": {
"basemaps": [
{
"attribution": "Map data © <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Tiles © <a href=\"http://www.mapquest.com/\" target=\"_blank\">MapQuest</a> <img src=\"https://developer.mapquest.com/content/osm/mq_logo.png\" />",
"name": "Street",
"subdomains": "1234",
"url": "https://otile{s}-s.mqcdn.com/tiles/1.0.0/{layer}/{z}/{x}/{y}.png",
"type": "tile",
"layer": "map"
},
{
"attribution": "Imagery © NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency, Tiles © <a href=\"http://www.mapquest.com/\" target=\"_blank\">MapQuest</a> <img src=\"https://developer.mapquest.com/content/osm/mq_logo.png\" />",
"name": "Aerial",
"subdomains": "1234",
"url": "https://otile{s}-s.mqcdn.com/tiles/1.0.0/{layer}/{z}/{x}/{y}.png",
"type": "tile",
"layer": "sat"
}
],
"bounds": [
[
-70,
-180
],
[
70,
180
]
]
},
"pages": {
"authority": {
"children": [
"identifier"
],
"name": "authority",
"url": "authorities",
"parents": [],
"list": true
},
"event": {
"partial": true,
"name": "event",
"children": [
"report"
],
"max_local_pages": 0,
"map": {
"detail": {
"layers": [
{
"name": "Observation",
"url": "events/{{id}}.geojson",
"type": "geojson"
}
]
},
"list": {
"layers": [
{
"popup": "event",
"name": "Observations",
"url": "events.geojson",
"type": "geojson",
"cluster": true
}
]
}
},
"url": "events",
"parents": [
"campaign",
"site"
],
"list": true
},
"report": {
"has_results": true,
"related": true,
"partial": true,
"name": "report",
"reversed": true,
"children": [
"result"
],
"url": "reports",
"parents": {
"reportstatus": [
"status"
],
"event": [
"event"
],
"site": [
"site"
],
"campaign": [
"campaign"
]
},
"list": true
},
"logout": {
"name": "logout",
"url": "logout"
},
"relationshiptype": {
"children": [
"relationship"
],
"name": "relationshiptype",
"url": "relationshiptypes",
"parents": [],
"list": true
},
"campaign": {
"lookup": "slug",
"children": [
"event",
"parameter"
],
"has_parameters": true,
"name": "campaign",
"url": "campaigns",
"parents": [],
"list": true
},
"relationship": {
"children": [],
"name": "relationship",
"url": "relationships",
"parents": {
"relationshiptype": [
"type"
]
},
"list": true
},
"reportstatus": {
"lookup": "slug",
"children": [
"report"
],
"name": "reportstatus",
"url": "reportstatuses",
"parents": [],
"list": true
},
"inverserelationship": {
"children": [],
"name": "inverserelationship",
"url": "inverserelationships",
"parents": {
"relationshiptype": [
"type"
]
},
"list": true
},
"parameter": {
"related": true,
"name": "parameter",
"children": [
"result"
],
"identified": true,
"url": "parameters",
"parents": [
"campaign"
],
"list": true
},
"identifier": {
"children": [],
"name": "identifier",
"url": "identifiers",
"parents": [
"authority"
],
"list": true
},
"login": {
"name": "login",
"url": "login"
},
"index": {
"map": {
"defaults": {
"layers": [
{
"popup": "event",
"name": "Observations",
"url": "events.geojson",
"type": "geojson",
"cluster": true
}
]
}
},
"name": "index",
"url": ""
},
"result": {
"children": [],
"name": "result",
"url": "results",
"parents": {
"parameter": [
"type"
],
"report": [
"report"
]
},
"list": true
},
"site": {
"name": "site",
"children": [
"event"
],
"map": true,
"url": "sites",
"parents": [],
"list": true
}
}
});
from vera.
So, I pulled the config.js
from the try.wq.io
repo once again and replaced the incorrect one with it. I then re-deployed and ran the app. I get the same error cannot set debug of type 'undefined'
. When I observe the scripts in the browser devtools (for instance trywq.js), the block of code that is in the config.js for the template settings, does not appear. Although it is now visible in the config.js. This is quite strange. Not sure what I should try next.
from vera.
Ok. I got it to work. There was no problem with try.wq.io
. I had a server configuration issue and old files from and old application cache manifest were being served up instead of the proper one. Its working now.
So, as far as this issue is concerned, I am going to go ahead now and close it. The issue, I thought originally was with vera, but it turned out to be try.wq.io
installation issues.
Recommendations for easier installation of try.wq.io
(on Mac osx Mavericks in my case):
- requirements.txt file. The installation process was a little painful due to the lack of a requirements file, so I had a few roadblocks there. But I think a requirements.txt file would help ease the installation process.
- A skeleton
app/js/data
folder would have prevented some errors. Would it be a good idea to include that in the try.wq.io repo? Or are those .gitignored files? - Change
sed -i
tosed -i.bak
in the twosed
lines in thedeploy.sh
script to prevent errors when installing on OSX. Provided, of course, that this does not cause errors when building on other systems (it hasn't caused any problems on my production server, which is running Ubuntu 14.04).
from vera.
Thanks for these recommendations. I added some gitignore files to the Try WQ repository. I added issues for the other recommendations: powered-by-wq/try.wq.io#7 and wq/wq-django-template#20.
from vera.
Related Issues (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 vera.