New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database created with Python 3.5 cannot be read with Python 2.7 #44
Comments
For completeness I also paste @fredrikaverpil's comment here:
|
The problem is indeed caused due to the use of As @fredrikaverpil suggested, the fix is quite simple. You can just change |
This is correct. I initialized the db using Python 2.x. About setting the protocol to version 2; Somehow I'm not sure about holding on to old versions is the best solution. Let's discuss. @eoylimaz what do you think? Is there any chance we can use another data type? |
I do agree the best solution is not to hold on to old versions. As you suggest another data type is viable option. Or the protocol version could be a setting the user can control somehow. But that might make matters needlessly complicated. |
PickleType is really unnecessary for this data. And because with my next push, Stalker will be mainly using PostgreSQL for its database backend, I think I should feel free to convert the data type to something like JSON. |
Sounds good to me! |
Perfect. Thank you for looking into this.
|
@eoyilmaz will stalker still work with SQLite? |
Just answering my own question... yes, it seems SQLite is working just fine with the latest 0.2.18 release 👍 |
It may work with SQLite superficially but there are a couple of code paths
(generating the whole tjp representation of a project which uses recursive
CTE queries, the new ExcludeConstraint in TimeLogs table etc.) that will
not work properly.
…On Mar 13, 2017 9:50 PM, "Fredrik Averpil" ***@***.***> wrote:
Just answering my own question... yes, it seems SQLite is working just
fine with the latest 0.2.18 release 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtDtO77u3kdaP_r-Y-iSh8fcc0eFUeNks5rlY_xgaJpZM4L-N3q>
.
|
Aha. It was actually quite convenient to be able to run a SQLite db for development purposes. But I could spin up a Postgres Docker container instead. I'm running Postgres 9.1 in production. Would you advise me to upgrade to a newer version due to these new features? I see the docs still mention SQLite. I'd propose the docs should be updated to reflect these new changes. On a similar note, I noticed that you can now use SQL for Postgres in Google Cloud. I wish to explore the possibilities to run Stalker either locally (using our own production database) or in the cloud, e.g. using the new SQL for Postgres in GCE. Most features are still in beta, but I'm hoping that it'll be possible to sync a local database with the GCE one somehow (replication?). |
Considering how we connect to a database is to give the username, password and an address, reaching to a database on the internet should not be problem (other than being slow may be). The main problem should be the pipeline tools, I believe. The tools that freelancers should have installed on their system (i.e. anima for our studio). |
Ahh yes I should update the Docs also yes. |
Is this still an issue with 0.2.18? I'm asking because I've been running 0.2.18 in development for quite some time now with Python 3.5. |
Yep, it still is. The studio working hours are stored as the Python class in the database. If it was stored as a json object (or something similar), there would be no need for |
Ok, I've released Stalker v0.2.19, but didn't have time to fix this one. |
Wow, that's an impressive release! 👍 |
Just double-checking; the 0.2.19 release doesn't require an alembic upgrade, correct? |
Awesome! |
Oh, I've completely unnoticed these messages for the last 2 days. @fredrikaverpil yes it doesn't require an alembic upgrade. @jasperges Oh boy (sigh!), we're still working on Stalker Pyramid actively (by we I mean me and my wife). The only reason that I do not release the source is that it contains HTML and CSS templates that we've bought (for 15 bucks actually!) and build the code on top of it. And the code in its current form (both the development and master branch) is crap and I don't like it. On the other hand, for the last 1 and a half year or so I've created another branch called But the client side is around %5-10 percent coded. I can release the source code at its current form without the HTML and CSS templates (and probably need to remove a lot of *.js files that comes with the template). And then if you like the idea, you can help us on developing Stalker Pyramid. |
I've forgot to mention that I've fixed this issue in v0.2.20 by properly deriving the But I don't want to get in to the hassle of writing a proper migration script which extracts the old So what do you say, do you mind the migration script to throw away the data which is very simple to recreate later on? or should I try to find a way to read the Pickled data and recreate the |
Awesome!
We actually don't use this feature of Stalker (not yet, at least) in our studio. So this is fine by me. |
@eoyilmaz Wow, thanks! For me it's also perfectly fine to throw away the data. |
…thus it is not stored in a ``PickleType`` column in ``Studio`` anymore. (issue: #44) * **Update:** Updated ``appveyor.yml`` to match ``travis.yml``.
This has been fixed in v0.2.20 (fd6f14d) NOTE: After the alembic upgrade, if there is a |
Because we've started talking about Stalker Pyramid here in this issue, I'm going to send a one final message about it. I've created a new repository for Stalker Pyramid and uploaded the stripped down version. So it doesn't have any closed source code dependency in it. Now we can start talking about it there (probably in a new issue). |
Continuing from this issue: #43
When first using stalker I followed the tutorial and used Python 3.5. Then later I tried to connect with Python 2.7 but that fails. It seems like it's related to
sqlalchemy
which usespickle
to dump and load data. In Python 3.5 the defaultpickle
protocol is 4, while on Python 2.7 the highest supportedpickle
protocol is 2. It seems at least some data is stored withpickle
protocol 4.I didn't have time yet to investigate thoroughly yet.
For complete reference: running in Python 2.7.13 I do the following:
And this is the error and traceback:
The text was updated successfully, but these errors were encountered: